exit if unable to open socket

This commit is contained in:
ehouse 2009-09-13 15:27:19 +00:00
parent b42e1adb0a
commit 7eeede45c3

View file

@ -794,7 +794,9 @@ main( int argc, char** argv )
for ( iter = ints.begin(); iter != ints.end(); ++iter ) { for ( iter = ints.begin(); iter != ints.end(); ++iter ) {
int port = *iter; int port = *iter;
if ( !g_listeners.PortInUse( port ) ) { if ( !g_listeners.PortInUse( port ) ) {
g_listeners.AddListener( port ); if ( !g_listeners.AddListener( port ) ) {
exit( 1 );
}
} else { } else {
logf( XW_LOGERROR, "port %d was in use", port ); logf( XW_LOGERROR, "port %d was in use", port );
} }