diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-06-01 14:26:11 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-06-01 14:26:11 +0100 |
commit | 66d8ec5545aa0e8c2831a583ccbe07a02db13d0f (patch) | |
tree | e3e96578751a5d9a50b8ad0f5705256072fc0776 /net | |
parent | a353d19e23d440036324c9ecb8058fbaf7a11b9c (diff) | |
download | prosody-66d8ec5545aa0e8c2831a583ccbe07a02db13d0f.tar.gz prosody-66d8ec5545aa0e8c2831a583ccbe07a02db13d0f.zip |
net.server_epoll: Handle missing ports from getsock/peername (as in the case of unix sockets)
Diffstat (limited to 'net')
-rw-r--r-- | net/server_epoll.lua | 4 |
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 |