mirror of
https://github.com/bjc/prosody.git
synced 2025-04-03 21:27:38 +03:00
net.server_epoll: Handle missing ports from getsock/peername (as in the case of unix sockets)
This commit is contained in:
parent
610be29e2a
commit
6ccd66e347
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue