Comparison

net/server_event.lua @ 4008:36bee5ca8b95

net.server_event: Log interface and port number when binding fails
author Matthew Wild <mwild1@gmail.com>
date Thu, 06 Jan 2011 13:47:20 +0000
parent 3649:ae99396ee261
child 4111:4716c7645ad2
comparison
equal deleted inserted replaced
4007:062b849ca088 4008:36bee5ca8b95
724 local addserver = ( function( ) 724 local addserver = ( function( )
725 return function( addr, port, listener, pattern, sslcfg, startssl ) -- TODO: check arguments 725 return function( addr, port, listener, pattern, sslcfg, startssl ) -- TODO: check arguments
726 --vdebug( "creating new tcp server with following parameters:", addr or "nil", port or "nil", sslcfg or "nil", startssl or "nil") 726 --vdebug( "creating new tcp server with following parameters:", addr or "nil", port or "nil", sslcfg or "nil", startssl or "nil")
727 local server, err = socket.bind( addr, port, cfg.ACCEPT_QUEUE ) -- create server socket 727 local server, err = socket.bind( addr, port, cfg.ACCEPT_QUEUE ) -- create server socket
728 if not server then 728 if not server then
729 debug( "creating server socket failed because:", err ) 729 debug( "creating server socket on "..addr.." port "..port.." failed:", err )
730 return nil, err 730 return nil, err
731 end 731 end
732 local sslctx 732 local sslctx
733 if sslcfg then 733 if sslcfg then
734 if not ssl then 734 if not ssl then