Revert "SERVER-500 more port/socket corner cases"
This reverts commit b691dc629e.
This commit is contained in:
@@ -271,10 +271,13 @@ namespace mongo {
|
||||
cerr << "count for port: " << port_ << " is not 0 is: " << dbs.count( port_ ) << endl;
|
||||
assert( dbs.count( port_ ) == 0 );
|
||||
}
|
||||
if ( port_ <= 0 || portToSocket.find( port_ ) == portToSocket.end() || portToSocket[ port_ ] <= 0 ) {
|
||||
if ( port_ > 0 ) {
|
||||
if ( portToSocket.find( port_ ) == portToSocket.end() ) {
|
||||
oldSocket_ = -1;
|
||||
} else {
|
||||
oldSocket_ = portToSocket[ port_ ];
|
||||
} else {
|
||||
oldSocket_ = portToSocket[ port_ ];
|
||||
assert( oldSocket_ > 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -284,11 +287,8 @@ namespace mongo {
|
||||
|
||||
// port allocator left this socket open to prevent someone else from grabbing
|
||||
// the port -- now we need to close the socket
|
||||
if ( oldSocket_ > 0 ) {
|
||||
if ( oldSocket_ > 0 )
|
||||
assert( 0 == close( oldSocket_ ) );
|
||||
portToSocket[ port_ ] = -1;
|
||||
oldSocket_ = -1;
|
||||
}
|
||||
|
||||
fflush( 0 );
|
||||
pid_ = fork();
|
||||
|
||||
Reference in New Issue
Block a user