aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_epoll.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-09-13 17:02:26 +0200
committerKim Alvefur <zash@zash.se>2018-09-13 17:02:26 +0200
commit4501390de5e4b604c37002acd0bacf7a1df2b62c (patch)
treea94219a12cf18d20bd8761feaae7e7a67263dbb0 /net/server_epoll.lua
parent60f7a7c3f1489a0a55356d713874f27f05ded150 (diff)
downloadprosody-4501390de5e4b604c37002acd0bacf7a1df2b62c.tar.gz
prosody-4501390de5e4b604c37002acd0bacf7a1df2b62c.zip
net.server_epoll: Remove coercion of connections to strings
No longer needed since util.logger does this now
Diffstat (limited to 'net/server_epoll.lua')
-rw-r--r--net/server_epoll.lua16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/server_epoll.lua b/net/server_epoll.lua
index 26568319..0c19b2a2 100644
--- a/net/server_epoll.lua
+++ b/net/server_epoll.lua
@@ -390,10 +390,10 @@ function interface:close()
if self.writebuffer and self.writebuffer[1] then
self:setflags(false, true); -- Flush final buffer contents
self.write, self.send = noop, noop; -- No more writing
- log("debug", "Close %s after writing", tostring(self));
+ log("debug", "Close %s after writing", self);
self.ondrain = interface.close;
else
- log("debug", "Close %s now", tostring(self));
+ log("debug", "Close %s now", self);
self.write, self.send = noop, noop;
self.close = noop;
self:on("disconnect");
@@ -421,12 +421,12 @@ end
function interface:starttls(tls_ctx)
if tls_ctx then self.tls_ctx = tls_ctx; end
if self.writebuffer and self.writebuffer[1] then
- log("debug", "Start TLS on %s after write", tostring(self));
+ log("debug", "Start TLS on %s after write", self);
self.ondrain = interface.starttls;
self.starttls = false;
self:setflags(nil, true); -- make sure wantwrite is set
else
- log("debug", "Start TLS on %s now", tostring(self));
+ log("debug", "Start TLS on %s now", self);
self:setflags(false, false);
local conn, err = luasec.wrap(self.conn, tls_ctx or self.tls_ctx);
if not conn then
@@ -449,22 +449,22 @@ function interface:tlshandskake()
self:setreadtimeout(false);
local ok, err = self.conn:dohandshake();
if ok then
- log("debug", "TLS handshake on %s complete", tostring(self));
+ log("debug", "TLS handshake on %s complete", self);
self.onwritable = nil;
self.onreadable = nil;
self._tls = true;
self:on("status", "ssl-handshake-complete");
self:init();
elseif err == "wantread" then
- log("debug", "TLS handshake on %s to wait until readable", tostring(self));
+ log("debug", "TLS handshake on %s to wait until readable", self);
self:setflags(true, false);
self:setreadtimeout(cfg.handshake_timeout);
elseif err == "wantwrite" then
- log("debug", "TLS handshake on %s to wait until writable", tostring(self));
+ log("debug", "TLS handshake on %s to wait until writable", self);
self:setflags(false, true);
self:setwritetimeout(cfg.handshake_timeout);
else
- log("debug", "TLS handshake error on %s: %s", tostring(self), err);
+ log("debug", "TLS handshake error on %s: %s", self, err);
self:on("disconnect", err);
self:destroy();
end