aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-11-17 23:45:44 +0100
committerKim Alvefur <zash@zash.se>2019-11-17 23:45:44 +0100
commit7dc9926e110024b70c497481538615a5f89e31c4 (patch)
tree862bd75b08cab8e3b9fdf1fd86aa6000d8a63fe1
parent7b8100dc081e37bd45c1baaf100e2580fe302d06 (diff)
downloadprosody-7dc9926e110024b70c497481538615a5f89e31c4.tar.gz
prosody-7dc9926e110024b70c497481538615a5f89e31c4.zip
Back out c8aa66595072: Extra changes accidentally included
-rw-r--r--net/server_epoll.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index d6174a4e..3a2dcbad 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -383,7 +383,7 @@ function interface:onreadable()
end
if err ~= "timeout" then
self:on("disconnect", err);
- self:close()
+ self:destroy()
return;
end
end
@@ -802,8 +802,7 @@ local function watchfd(fd, onreadable, onwritable)
end;
-- Otherwise it'll need to be something LuaSocket-compatible
end
- conn.id = new_id();
- conn.log = logger.init(("fdwatch%s"):format(conn.id));
+ conn.log = logger.init(("fdwatch%s"):format(new_id()));
conn:add(onreadable, onwritable);
return conn;
end;
@@ -912,8 +911,7 @@ return {
fds[fd] = nil;
end;
}, interface_mt);
- conn.id = conn:getfd();
- conn.log = logger.init(("fdwatch%d"):format(conn.id));
+ conn.log = logger.init(("fdwatch%d"):format(conn:getfd()));
local ok, err = conn:add(mode == "r" or mode == "rw", mode == "w" or mode == "rw");
if not ok then return ok, err; end
return conn;