Software /
code /
prosody
Comparison
net/server_select.lua @ 4904:5d2ff4627b72
net.server_select: Don't close client connections when closing a server (it wasn't working anyway)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 23 May 2012 02:20:32 +0100 |
parent | 4903:c576d2175fa4 |
child | 4962:1d8fb12a9b2d |
comparison
equal
deleted
inserted
replaced
4903:c576d2175fa4 | 4904:5d2ff4627b72 |
---|---|
189 return sslctx | 189 return sslctx |
190 end | 190 end |
191 handler.remove = function( ) | 191 handler.remove = function( ) |
192 connections = connections - 1 | 192 connections = connections - 1 |
193 end | 193 end |
194 handler.close = function( ) | 194 handler.close = function() |
195 for _, handler in pairs( _socketlist ) do | |
196 if handler.serverport == serverport then | |
197 handler.disconnect( handler, "server closed" ) | |
198 handler:close( true ) | |
199 end | |
200 end | |
201 socket:close( ) | 195 socket:close( ) |
202 _sendlistlen = removesocket( _sendlist, socket, _sendlistlen ) | 196 _sendlistlen = removesocket( _sendlist, socket, _sendlistlen ) |
203 _readlistlen = removesocket( _readlist, socket, _readlistlen ) | 197 _readlistlen = removesocket( _readlist, socket, _readlistlen ) |
204 _server[ip..":"..serverport] = nil; | 198 _server[ip..":"..serverport] = nil; |
205 _socketlist[ socket ] = nil | 199 _socketlist[ socket ] = nil |