Comparison

net/server_epoll.lua @ 11804:22825cb5dcd8

net.server_epoll: Don't immediately destroy upon getting closed on read Instead try to write any remaining buffered data. If the write attempt also fails with "closed" then there's nothing we can do and the socket is gone. This reverts what appears to be a mistakenly included part of c8aa66595072 Thanks jonas’ for noticing
author Kim Alvefur <zash@zash.se>
date Wed, 15 Sep 2021 18:39:37 +0200
parent 11793:9006ff4838ff
child 11805:2327e03d1f8d
comparison
equal deleted inserted replaced
11803:024b44ad5651 11804:22825cb5dcd8
458 self:debug("Connection closed by remote"); 458 self:debug("Connection closed by remote");
459 else 459 else
460 self:debug("Read error, closing (%s)", err); 460 self:debug("Read error, closing (%s)", err);
461 end 461 end
462 self:on("disconnect", err); 462 self:on("disconnect", err);
463 self:destroy() 463 self:close();
464 return; 464 return;
465 end 465 end
466 end 466 end
467 if not self.conn then return; end 467 if not self.conn then return; end
468 if self._limit and (data or partial) then 468 if self._limit and (data or partial) then