aboutsummaryrefslogtreecommitdiffstats
path: root/net/server_event.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-04-24 15:52:30 +0100
committerMatthew Wild <mwild1@gmail.com>2012-04-24 15:52:30 +0100
commitdcdfe0e0ceb454cbb8ecb8461fd4648f5e560830 (patch)
tree9044d701818a9d87ba2d84f8ab06c76e764e9617 /net/server_event.lua
parentea7212be3be670deda10d80f0d99abcb9d171f7a (diff)
downloadprosody-dcdfe0e0ceb454cbb8ecb8461fd4648f5e560830.tar.gz
prosody-dcdfe0e0ceb454cbb8ecb8461fd4648f5e560830.zip
net.server_event: Do not automatically close clients when closing a server port
Diffstat (limited to 'net/server_event.lua')
-rw-r--r--net/server_event.lua19
1 files changed, 3 insertions, 16 deletions
diff --git a/net/server_event.lua b/net/server_event.lua
index dbf5161f..8d6f5597 100644
--- a/net/server_event.lua
+++ b/net/server_event.lua
@@ -343,24 +343,11 @@ do
return nil, "writebuffer not empty, waiting"
end
else
- debug( "try to close server with id:", self.id, "args:", now )
+ debug( "try to close server with id:", tostring(self.id), "args:", tostring(now) )
self.fatalerror = "server to close"
self:_lock( true )
- local count = 0
- for _, item in ipairs( interfacelist( ) ) do
- if ( item.type ~= "server" ) and ( item._server == self ) then -- client/server match
- if item:close( now ) then -- writebuffer was empty
- count = count + 1
- end
- end
- end
- local timeout = 0 -- dont wait for unfinished writebuffers of clients...
- if not now then
- timeout = cfg.WRITE_TIMEOUT -- ...or wait for it
- end
- self:_close( timeout ) -- add new event to remove the server interface
- debug( "seconds remained until server is closed:", timeout )
- return count -- returns finished clients with empty writebuffer
+ self:_close( 0 ) -- add new event to remove the server interface
+ return true
end
end