diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-11-22 04:04:04 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-11-22 04:04:04 +0000 |
commit | 3fe8e5575403a0e9a06923dfcf62773c40cd1ec3 (patch) | |
tree | e71326532cdcbdee2ddaab65a7276a9718e573a7 /net | |
parent | 4d67d89061c92629e6e942ab2851482cc077ad7d (diff) | |
download | prosody-3fe8e5575403a0e9a06923dfcf62773c40cd1ec3.tar.gz prosody-3fe8e5575403a0e9a06923dfcf62773c40cd1ec3.zip |
net.server_event: Obey nowriting/nointerface for locks in interface methods
Diffstat (limited to 'net')
-rw-r--r-- | net/server_event.lua | 2 |
1 files changed, 2 insertions, 0 deletions
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"
|