aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_event.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-11-26 22:15:40 +0000
committerMatthew Wild <mwild1@gmail.com>2009-11-26 22:15:40 +0000
commitdf4d4cd44521d393dbe0a3ee8a62fe0add80f2ba (patch)
treeee8003dc588eac3e42336488c5dff40cf01ac52e /net/server_event.lua
parent9d32568d5d90efa317e4f77a94a678a653547cf0 (diff)
downloadprosody-df4d4cd44521d393dbe0a3ee8a62fe0add80f2ba.tar.gz
prosody-df4d4cd44521d393dbe0a3ee8a62fe0add80f2ba.zip
net.server_event: Fix to make ontimeout() listener callback work
Diffstat (limited to 'net/server_event.lua')
-rw-r--r--net/server_event.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/server_event.lua b/net/server_event.lua
index b467a84d..74dffb94 100644
--- a/net/server_event.lua
+++ b/net/server_event.lua
@@ -138,7 +138,7 @@ do
local callback = function( event )
if EV_TIMEOUT == event then -- timout during connection
self.fatalerror = "connection timeout"
- self.listener.ontimeout( self ) -- call timeout listener
+ self:ontimeout() -- call timeout listener
self:_close()
debug( "new connection failed. id:", self.id, "error:", self.fatalerror )
else
@@ -432,6 +432,7 @@ do
onconnect = listener.onconnect; -- will be called when client disconnects
ondisconnect = listener.ondisconnect; -- will be called when client disconnects
onincoming = listener.onincoming; -- will be called when client sends data
+ ontimeout = listener.ontimeout; -- called when fatal socket timeout occurs
eventread = false, eventwrite = false, eventclose = false,
eventhandshake = false, eventstarthandshake = false; -- event handler
eventconnect = false, eventsession = false; -- more event handler...