mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2024-12-27 09:58:45 +01:00
exit if unable to open socket
This commit is contained in:
parent
b42e1adb0a
commit
7eeede45c3
1 changed files with 3 additions and 1 deletions
|
@ -794,7 +794,9 @@ main( int argc, char** argv )
|
|||
for ( iter = ints.begin(); iter != ints.end(); ++iter ) {
|
||||
int port = *iter;
|
||||
if ( !g_listeners.PortInUse( port ) ) {
|
||||
g_listeners.AddListener( port );
|
||||
if ( !g_listeners.AddListener( port ) ) {
|
||||
exit( 1 );
|
||||
}
|
||||
} else {
|
||||
logf( XW_LOGERROR, "port %d was in use", port );
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue