aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/server_epoll.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 82f7ab59..ded42c4d 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -619,11 +619,11 @@ function interface:updatenames()
local conn = self.conn;
local ok, peername, peerport = pcall(conn.getpeername, conn);
if ok and peername then
- self.peername, self.peerport = peername, peerport;
+ self.peername, self.peerport = peername, peerport or 0;
end
local ok, sockname, sockport = pcall(conn.getsockname, conn);
if ok and sockname then
- self.sockname, self.sockport = sockname, sockport;
+ self.sockname, self.sockport = sockname, sockport or 0;
end
end