Software /
code /
prosody
Diff
net/server_event.lua @ 2641:b083a667e3be
net.server_event: Fire onincoming() callback for new connections as opposed to the new onconnect() - let's change this for a future version though
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 14 Feb 2010 20:47:09 +0000 |
parent | 2639:a7f683622b35 |
child | 2656:9fab59009397 |
line wrap: on
line diff
--- a/net/server_event.lua Sun Feb 14 20:37:49 2010 +0000 +++ b/net/server_event.lua Sun Feb 14 20:47:09 2010 +0000 @@ -161,7 +161,7 @@ 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:onconnect() + self:onincoming() self.eventsession = nil return -1 end @@ -677,6 +677,7 @@ clientinterface:_start_session( clientinterface.onconnect ) end debug( "accepted incoming client connection from:", ip, port ) + client, err = server:accept() -- try to accept again end return EV_READ