Skip to content

Commit

Permalink
Don't destroy _hostNameCached SERVER-4367
Browse files Browse the repository at this point in the history
  • Loading branch information
RedBeard0531 committed Feb 9, 2012
1 parent 5b7abd2 commit af66393
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/mongo/db/commands/cloud.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ using namespace mongoutils;
namespace mongo {

mapsf<string,string> dynHostNames;
extern DiagStr _hostNameCached;
extern DiagStr& _hostNameCached;

string dynHostMyName() {
if( !str::startsWith(_hostNameCached, '#') )
Expand Down
2 changes: 1 addition & 1 deletion src/mongo/util/net/sock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ namespace mongo {

// --- my --

DiagStr _hostNameCached;
DiagStr& _hostNameCached = *(new DiagStr); // this is also written to from commands/cloud.cpp

string getHostName() {
{
Expand Down

0 comments on commit af66393

Please sign in to comment.