Software /
code /
prosody
Comparison
net/server_select.lua @ 7097:5a71aaa2c542
server_select: Add logging of when servers are paused and resumed
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 22 Jan 2016 02:00:43 +0100 |
parent | 7096:95e4c81291cc |
child | 7098:5286e79c6829 |
child | 7736:5a07fe977002 |
comparison
equal
deleted
inserted
replaced
7096:95e4c81291cc | 7097:5a71aaa2c542 |
---|---|
211 _socketlist[ socket ] = nil | 211 _socketlist[ socket ] = nil |
212 socket:close( ) | 212 socket:close( ) |
213 socket = nil; | 213 socket = nil; |
214 end | 214 end |
215 handler.paused = true; | 215 handler.paused = true; |
216 out_put("server.lua: server [", ip, "]:", serverport, " paused") | |
216 end | 217 end |
217 end | 218 end |
218 handler.resume = function( ) | 219 handler.resume = function( ) |
219 if handler.paused then | 220 if handler.paused then |
220 if not socket then | 221 if not socket then |
223 end | 224 end |
224 _readlistlen = addsocket(_readlist, socket, _readlistlen) | 225 _readlistlen = addsocket(_readlist, socket, _readlistlen) |
225 _socketlist[ socket ] = handler | 226 _socketlist[ socket ] = handler |
226 _fullservers[ handler ] = nil | 227 _fullservers[ handler ] = nil |
227 handler.paused = false; | 228 handler.paused = false; |
229 out_put("server.lua: server [", ip, "]:", serverport, " resumed") | |
228 end | 230 end |
229 end | 231 end |
230 handler.ip = function( ) | 232 handler.ip = function( ) |
231 return ip | 233 return ip |
232 end | 234 end |