diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-11-26 22:19:49 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-11-26 22:19:49 +0000 |
commit | e6d079f88724611385a25a1c2554b13bde9bc44a (patch) | |
tree | 7163389a36be73747e3400dc9a3f3d7efe3ba860 /net/server_event.lua | |
parent | 05348c61f37e80e99544ab9f655833a06c88612c (diff) | |
download | prosody-e6d079f88724611385a25a1c2554b13bde9bc44a.tar.gz prosody-e6d079f88724611385a25a1c2554b13bde9bc44a.zip |
net.server_event: Count the number of client connections *upwards* :)
Diffstat (limited to 'net/server_event.lua')
-rw-r--r-- | net/server_event.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/server_event.lua b/net/server_event.lua index f5eafaf6..8187a7d0 100644 --- a/net/server_event.lua +++ b/net/server_event.lua @@ -263,7 +263,7 @@ do _ = self.eventreadtimeout and self.eventreadtimeout:close( )
_ = self.ondisconnect and self:ondisconnect( self.fatalerror ) -- call ondisconnect listener (wont be the case if handshake failed on connect)
_ = self.conn and self.conn:close( ) -- close connection, must also be called outside of any socket registered events!
- self._server:counter(-1);
+ _ = self._server and self._server:counter(-1);
self.eventread, self.eventwrite = nil, nil
self.eventstarthandshake, self.eventhandshake, self.eventclose = nil, nil, nil
self.readcallback, self.writecallback = nil, nil
@@ -283,7 +283,7 @@ do function interface_mt:counter(c)
if c then
- self._connections = self._connections - c
+ self._connections = self._connections + c
end
return self._connections
end
|