Software /
code /
prosody
Changeset
7591:138f16eb39fb
net.server_epoll: Improve syntax
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Aug 2016 16:28:08 +0200 |
parents | 7590:fd07ab702f83 |
children | 7592:10d2f008321d |
files | net/server_epoll.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/net/server_epoll.lua Thu Aug 18 16:12:28 2016 +0200 +++ b/net/server_epoll.lua Thu Aug 18 16:28:08 2016 +0200 @@ -293,7 +293,7 @@ self:ondrain(); -- Be aware of writes in ondrain return; elseif partial then - buffer[1] = data:sub(partial+1) + buffer[1] = data:sub(partial+1); for i = #buffer, 2, -1 do buffer[i] = nil; end @@ -416,6 +416,7 @@ writebuffer = {}; tls = tls; }, interface_mt); + if client.getpeername then conn.peername, conn.peerport = client:getpeername(); end