aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-02-18 16:41:53 +0000
committerMatthew Wild <mwild1@gmail.com>2010-02-18 16:41:53 +0000
commitec83dc97eea39c0dc3e16eabee81b2fdf1f7bc60 (patch)
treea11c1586f605e04d36c145d436708c5142807275 /net
parent9db76151d498844384b41a0f15443af996baf7e2 (diff)
downloadprosody-ec83dc97eea39c0dc3e16eabee81b2fdf1f7bc60.tar.gz
prosody-ec83dc97eea39c0dc3e16eabee81b2fdf1f7bc60.zip
net.server_event: Pass false as connection error to disconnect handler if close was initiated by us
Diffstat (limited to 'net')
-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 610c2e7a..3456fb9e 100644
--- a/net/server_event.lua
+++ b/net/server_event.lua
@@ -262,7 +262,7 @@ do
_ = self.eventsession and self.eventsession:close( )
_ = self.eventwritetimeout and self.eventwritetimeout:close( )
_ = self.eventreadtimeout and self.eventreadtimeout:close( )
- _ = self.ondisconnect and self:ondisconnect( self.fatalerror ) -- call ondisconnect listener (wont be the case if handshake failed on connect)
+ _ = self.ondisconnect and self:ondisconnect( self.fatalerror ~= "client to close" and self.fatalerror) -- call ondisconnect listener (wont be the case if handshake failed on connect)
_ = self.conn and self.conn:close( ) -- close connection, must also be called outside of any socket registered events!
_ = self._server and self._server:counter(-1);
self.eventread, self.eventwrite = nil, nil