aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2016-08-18 16:28:08 +0200
committerKim Alvefur <zash@zash.se>2016-08-18 16:28:08 +0200
commit61a9eab50c3c483711eaa85f5117f67f6b45f1a0 (patch)
tree2bd7eaf77f61dcc5719ca091b19515a513f990cc /net/server_epoll.lua
parent5d28e09198cbc1daa71d5068f522e47f27b5dcb8 (diff)
downloadprosody-61a9eab50c3c483711eaa85f5117f67f6b45f1a0.tar.gz
prosody-61a9eab50c3c483711eaa85f5117f67f6b45f1a0.zip
net.server_epoll: Improve syntax
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r--net/server_epoll.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 39cd8a58..99561c18 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -293,7 +293,7 @@ function interface:onwriteable()
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 @@ local function wrapsocket(client, server, pattern, listeners, tls) -- luasocket
writebuffer = {};
tls = tls;
}, interface_mt);
+
if client.getpeername then
conn.peername, conn.peerport = client:getpeername();
end