From 3fe8e5575403a0e9a06923dfcf62773c40cd1ec3 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Sun, 22 Nov 2009 04:04:04 +0000 Subject: net.server_event: Obey nowriting/nointerface for locks in interface methods --- net/server_event.lua | 2 ++ 1 file changed, 2 insertions(+) (limited to 'net') diff --git a/net/server_event.lua b/net/server_event.lua index 75c146eb..e4653cb1 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -290,6 +290,7 @@ do -- Public methods function interface_mt:write(data) + if self.nowriting then return nil, "locked" end vdebug( "try to send data to client, id/data:", self.id, data ) data = tostring( data ) local len = string_len( data ) @@ -308,6 +309,7 @@ do return true end function interface_mt:close(now) + if self.nointerface then return nil, "locked"; end debug( "try to close client connection with id:", self.id ) if self.type == "client" then self.fatalerror = "client to close" -- cgit v1.2.3