Fix a bug Arthur reported -- if you didn't configure for inbound connections,

outbound peer and secure websocket connections wouldn't work.
This commit is contained in:
JoelKatz
2013-02-03 23:03:14 -08:00
parent b94c91fb9c
commit c6aac0f9af
2 changed files with 6 additions and 3 deletions

View File

@@ -166,7 +166,7 @@ void Application::setup()
//
// Allow peer connections.
//
if (!theConfig.RUN_STANDALONE && !theConfig.PEER_IP.empty() && theConfig.PEER_PORT)
if (!theConfig.RUN_STANDALONE)
{
try
{

View File

@@ -35,9 +35,12 @@ PeerDoor::PeerDoor(boost::asio::io_service& io_service) :
if (1 != SSL_CTX_set_cipher_list(mCtx.native_handle(), theConfig.PEER_SSL_CIPHER_LIST.c_str()))
std::runtime_error("Error setting cipher list (no valid ciphers).");
Log(lsINFO) << "Peer port: " << theConfig.PEER_IP << " " << theConfig.PEER_PORT;
startListening();
if (!theConfig.PEER_IP.empty() && theConfig.PEER_PORT)
{
Log(lsINFO) << "Peer port: " << theConfig.PEER_IP << " " << theConfig.PEER_PORT;
startListening();
}
}
void PeerDoor::startListening()