# HG changeset patch # User Matthew Wild # Date 1519400472 0 # Node ID 075df839c1102c589bde56f324497043d2c07a5c # Parent 257fd322fc9feaf856429a2f7d0d6e214ccddce5 net.server_event: Not every instantly-readable connection is an error, continue if possible diff -r 257fd322fc9f -r 075df839c110 net/server_event.lua --- a/net/server_event.lua Fri Feb 23 15:33:02 2018 +0000 +++ b/net/server_event.lua Fri Feb 23 15:41:12 2018 +0000 @@ -105,9 +105,13 @@ self:ontimeout() -- call timeout listener self:_close() debug( "new connection failed. id:", self.id, "error:", self.fatalerror ) - elseif EV_READWRITE == event then - self.readcallback(event); else + if EV_READWRITE == event then + if self.readcallback(event) == -1 then + -- Fatal error occurred + return -1; + end + end if plainssl and has_luasec then -- start ssl session self:starttls(self._sslctx, true) else -- normal connection