Software / code / prosody
Comparison
net/server_event.lua @ 2660:9e5b21b7b2f9
net.server_event: Pass false as connection error to disconnect handler if close was initiated by us
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 18 Feb 2010 16:41:53 +0000 |
| parent | 2656:9fab59009397 |
| child | 2708:d9c4ade80ae9 |
comparison
equal
deleted
inserted
replaced
| 2659:ba6dd11f7259 | 2660:9e5b21b7b2f9 |
|---|---|
| 260 _ = self.eventstarthandshake and self.eventstarthandshake:close( ) | 260 _ = self.eventstarthandshake and self.eventstarthandshake:close( ) |
| 261 _ = self.eventconnect and self.eventconnect:close( ) | 261 _ = self.eventconnect and self.eventconnect:close( ) |
| 262 _ = self.eventsession and self.eventsession:close( ) | 262 _ = self.eventsession and self.eventsession:close( ) |
| 263 _ = self.eventwritetimeout and self.eventwritetimeout:close( ) | 263 _ = self.eventwritetimeout and self.eventwritetimeout:close( ) |
| 264 _ = self.eventreadtimeout and self.eventreadtimeout:close( ) | 264 _ = self.eventreadtimeout and self.eventreadtimeout:close( ) |
| 265 _ = self.ondisconnect and self:ondisconnect( self.fatalerror ) -- call ondisconnect listener (wont be the case if handshake failed on connect) | 265 _ = 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) |
| 266 _ = self.conn and self.conn:close( ) -- close connection, must also be called outside of any socket registered events! | 266 _ = self.conn and self.conn:close( ) -- close connection, must also be called outside of any socket registered events! |
| 267 _ = self._server and self._server:counter(-1); | 267 _ = self._server and self._server:counter(-1); |
| 268 self.eventread, self.eventwrite = nil, nil | 268 self.eventread, self.eventwrite = nil, nil |
| 269 self.eventstarthandshake, self.eventhandshake, self.eventclose = nil, nil, nil | 269 self.eventstarthandshake, self.eventhandshake, self.eventclose = nil, nil, nil |
| 270 self.readcallback, self.writecallback = nil, nil | 270 self.readcallback, self.writecallback = nil, nil |