diff options
author | Matthew Wild <mwild1@gmail.com> | 2010-04-11 01:29:59 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2010-04-11 01:29:59 +0100 |
commit | e0c9c76b44e32e17f17b06e546e5283728fdb706 (patch) | |
tree | 01ad6f8322731fd362f897a844521ed29417c579 /net | |
parent | 6c9b44d6303ed41676b2bb8e9bc27c457fbd9fd9 (diff) | |
download | prosody-e0c9c76b44e32e17f17b06e546e5283728fdb706.tar.gz prosody-e0c9c76b44e32e17f17b06e546e5283728fdb706.zip |
net.server_event: Call listener.onconnect if it exists, otherwise stick to listener.onincoming
Diffstat (limited to 'net')
-rw-r--r-- | net/server_event.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/server_event.lua b/net/server_event.lua index 5e62f3fd..be9e7f0a 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -160,8 +160,8 @@ do local callback = function( ) self:_lock( false, false, false ) --vdebug( "start listening on client socket with id:", self.id ) - self.eventread = addevent( base, self.conn, EV_READ, self.readcallback, cfg.READ_TIMEOUT ) -- register callback - self:onincoming() + self.eventread = addevent( base, self.conn, EV_READ, self.readcallback, cfg.READ_TIMEOUT ); -- register callback + (self.onconnect or self.onincoming)(self) self.eventsession = nil return -1 end |