aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-03-25 12:32:25 +0000
committerMatthew Wild <mwild1@gmail.com>2010-03-25 12:32:25 +0000
commit3a47c0c1736ab4b39d397e5d9c1285b3aba19071 (patch)
tree87c5329e964856ceb97f58841b5024e48224d45f
parentef00aa87e4adb5fbe1779e5cf67bed272d02589e (diff)
downloadprosody-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.lua2
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