Exit with code 3 if network port is in use.

This commit is contained in:
Arthur Britto
2012-12-20 23:19:20 -08:00
parent fadf9aa442
commit 8f35b78651
3 changed files with 57 additions and 15 deletions

View File

@@ -58,7 +58,7 @@ void WSDoor::startListening()
SSL_CTX_set_tmp_dh_callback(mCtx->native_handle(), handleTmpDh);
if(theConfig.WEBSOCKET_SECURE)
if (theConfig.WEBSOCKET_SECURE)
{
// Construct a single handler for all requests.
websocketpp::server_tls::handler::ptr handler(new WSServerHandler<websocketpp::server_tls>(mCtx, mPublic));
@@ -94,7 +94,8 @@ void WSDoor::startListening()
}
delete mSEndpoint;
}else
}
else
{
// Construct a single handler for all requests.
websocketpp::server::handler::ptr handler(new WSServerHandler<websocketpp::server>(mCtx, mPublic));
@@ -131,7 +132,6 @@ void WSDoor::startListening()
delete mEndpoint;
}
}
WSDoor* WSDoor::createWSDoor(const std::string& strIp, const int iPort, bool bPublic)
@@ -163,5 +163,4 @@ void WSDoor::stop()
}
}
// vim:ts=4