# HG changeset patch # User Kim Alvefur # Date 1570903924 -7200 # Node ID d86b1304451a4528af467055fa55923f629bd7cc # Parent c0a72c97e6cf5e4af8888a4a50de018cc62b1f5f net.server_epoll: Handle getpeer/sockname returning a normal error These will sometimes return nil, "Transport not connected" but not throw a hard error. This shouldn't be treated as success. diff -r c0a72c97e6cf -r d86b1304451a net/server_epoll.lua --- a/net/server_epoll.lua Sat Oct 12 20:07:50 2019 +0200 +++ b/net/server_epoll.lua Sat Oct 12 20:12:04 2019 +0200 @@ -605,11 +605,11 @@ function interface:updatenames() local conn = self.conn; local ok, peername, peerport = pcall(conn.getpeername, conn); - if ok then + if ok and peername then self.peername, self.peerport = peername, peerport; end local ok, sockname, sockport = pcall(conn.getsockname, conn); - if ok then + if ok and sockname then self.sockname, self.sockport = sockname, sockport; end end