From 3cc1ca831f9d6e0dd56b7e7d265e796d9305d915 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 2 May 2018 19:29:31 +0200 Subject: net.server_epoll: Guard against connection missing the getpeername method (thanks LuaSec) --- net/server_epoll.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/server_epoll.lua b/net/server_epoll.lua index 4e2faf1b..564444f8 100644 --- a/net/server_epoll.lua +++ b/net/server_epoll.lua @@ -540,7 +540,7 @@ end -- Connected! function interface:onconnect() - if self.conn and not self.peername then + if self.conn and not self.peername and self.conn.getpeername then self.peername, self.peerport = self.conn:getpeername(); end self.onconnect = noop; -- cgit v1.2.3