Software /
code /
prosody
Comparison
net/server_event.lua @ 8530:075df839c110
net.server_event: Not every instantly-readable connection is an error, continue if possible
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 23 Feb 2018 15:41:12 +0000 |
parent | 8529:257fd322fc9f |
child | 8728:41c959c5c84b |
comparison
equal
deleted
inserted
replaced
8529:257fd322fc9f | 8530:075df839c110 |
---|---|
103 if EV_TIMEOUT == event then -- timeout during connection | 103 if EV_TIMEOUT == event then -- timeout during connection |
104 self.fatalerror = "connection timeout" | 104 self.fatalerror = "connection timeout" |
105 self:ontimeout() -- call timeout listener | 105 self:ontimeout() -- call timeout listener |
106 self:_close() | 106 self:_close() |
107 debug( "new connection failed. id:", self.id, "error:", self.fatalerror ) | 107 debug( "new connection failed. id:", self.id, "error:", self.fatalerror ) |
108 elseif EV_READWRITE == event then | |
109 self.readcallback(event); | |
110 else | 108 else |
109 if EV_READWRITE == event then | |
110 if self.readcallback(event) == -1 then | |
111 -- Fatal error occurred | |
112 return -1; | |
113 end | |
114 end | |
111 if plainssl and has_luasec then -- start ssl session | 115 if plainssl and has_luasec then -- start ssl session |
112 self:starttls(self._sslctx, true) | 116 self:starttls(self._sslctx, true) |
113 else -- normal connection | 117 else -- normal connection |
114 self:_start_session(true) | 118 self:_start_session(true) |
115 end | 119 end |