0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 00:56:44 +01:00

Don't return from main(), even if listen socket is closed

This commit is contained in:
Aaron 2009-04-01 13:36:39 -04:00
parent ed35b0874c
commit 8ad34d6186

View File

@ -382,6 +382,10 @@ namespace mongo {
srand(curTimeMicros() ^ startupSrandTimer.micros());
listen(listenPort);
// listen() will return when exit code closes its socket.
while( 1 )
sleepsecs( 100 );
}
void initAndListen(int listenPort, const char *appserverLoc = null) {
try { _initAndListen(listenPort, appserverLoc); }