From 8fd402bfcf3ab32bd59b0b80017ce5eccf94f093 Mon Sep 17 00:00:00 2001 From: sandos Date: Thu, 10 Feb 2011 09:25:42 +0100 Subject: [PATCH] Set SO_REUSEADDR for JSON-RPC port --- rpc.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rpc.cpp b/rpc.cpp index 055e0cf1..029993fe 100644 --- a/rpc.cpp +++ b/rpc.cpp @@ -1710,6 +1710,8 @@ void ThreadRPCServer2(void* parg) ip::tcp::endpoint endpoint(bindAddress, GetArg("-rpcport", 8332)); ip::tcp::acceptor acceptor(io_service, endpoint); + acceptor.set_option(boost::asio::ip::tcp::acceptor::reuse_address(true)); + #ifdef USE_SSL ssl::context context(io_service, ssl::context::sslv23); if (fUseSSL)