Software /
code /
prosody
Changeset
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 |
parents | 2640:2dace3e87dd1 |
children | 2642:333d7e2033b2 |
files | net/server_event.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
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