diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-03-25 12:32:25 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-03-25 12:32:25 +0000 |
commit | 3a47c0c1736ab4b39d397e5d9c1285b3aba19071 (patch) | |
tree | 87c5329e964856ceb97f58841b5024e48224d45f | |
parent | ef00aa87e4adb5fbe1779e5cf67bed272d02589e (diff) | |
download | prosody-3a47c0c1736ab4b39d397e5d9c1285b3aba19071.tar.gz prosody-3a47c0c1736ab4b39d397e5d9c1285b3aba19071.zip |
net.server_event: Don't re-try a write if the connection closed (thanks Flo)
-rw-r--r-- | net/server_event.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/server_event.lua b/net/server_event.lua index 15fe4b3b..af6da45e 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -535,7 +535,7 @@ do end interface.eventwrite = nil return -1 - elseif byte then -- want write again + elseif byte and (err == "timeout" or err == "wantwrite") then -- want write again --vdebug( "writebuffer is not empty:", err ) interface.writebuffer = string_sub( interface.writebuffer, byte + 1, interface.writebufferlen ) -- new buffer interface.writebufferlen = interface.writebufferlen - byte |