Software /
code /
prosody
Comparison
net/server_select.lua @ 5664:4f499eb63c04
Merge 0.9->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 09 Jun 2013 17:03:15 +0200 |
parent | 5645:ae079d57af2e |
parent | 5663:4e51ceee469c |
child | 5776:bd0ff8ae98a8 |
comparison
equal
deleted
inserted
replaced
5662:685d46ec352b | 5664:4f499eb63c04 |
---|---|
261 wrapconnection = function( server, listeners, socket, ip, serverport, clientport, pattern, sslctx ) -- this function wraps a client to a handler object | 261 wrapconnection = function( server, listeners, socket, ip, serverport, clientport, pattern, sslctx ) -- this function wraps a client to a handler object |
262 | 262 |
263 if socket:getfd() >= _maxfd then | 263 if socket:getfd() >= _maxfd then |
264 out_error("server.lua: Disallowed FD number: "..socket:getfd()) -- PROTIP: Switch to libevent | 264 out_error("server.lua: Disallowed FD number: "..socket:getfd()) -- PROTIP: Switch to libevent |
265 socket:close( ) -- Should we send some kind of error here? | 265 socket:close( ) -- Should we send some kind of error here? |
266 server.pause( ) | 266 if server then |
267 server.pause( ) | |
268 end | |
267 return nil, nil, "fd-too-large" | 269 return nil, nil, "fd-too-large" |
268 end | 270 end |
269 socket:settimeout( 0 ) | 271 socket:settimeout( 0 ) |
270 | 272 |
271 --// local import of socket methods //-- | 273 --// local import of socket methods //-- |