From 2460cc0e2d4a2e09bc8f140bc22f4b8a8f442667 Mon Sep 17 00:00:00 2001 From: Aaron Date: Mon, 11 Jan 2010 18:30:22 -0800 Subject: [PATCH] SERVER-500 MINOR handle hardcoded ports as well --- shell/utils.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shell/utils.cpp b/shell/utils.cpp index b343520c51c..1fd3ef02a53 100644 --- a/shell/utils.cpp +++ b/shell/utils.cpp @@ -287,7 +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 - assert( 0 == close( oldSocket_ ) ); + if ( oldSocket_ > 0 ) + assert( 0 == close( oldSocket_ ) ); fflush( 0 ); pid_ = fork();