diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-08-26 12:04:34 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2015-08-26 12:06:08 +0200 |
commit | 981fd92bc5e233b15cb4205f17c9b707e6846a18 (patch) | |
tree | 7649a5389c7174dff7c5c0fe3be7bc0db1949ac5 /src | |
parent | da9beb288d2ee35b9c70513dd18f220b2dc32f16 (diff) | |
parent | bd30c3dced21fca869a14c75081f15195762afe1 (diff) | |
download | bitcoin-981fd92bc5e233b15cb4205f17c9b707e6846a18.tar.xz |
Merge pull request #6590
bd30c3d rpc-tests: re-enable rpc-tests for Windows (Cory Fields)
a193387 net: Set SO_REUSEADDR for Windows too (Cory Fields)
Diffstat (limited to 'src')
-rw-r--r-- | src/net.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/net.cpp b/src/net.cpp index fb5726a2b9..8fda5140ca 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1625,8 +1625,10 @@ bool BindListenPort(const CService &addrBind, string& strError, bool fWhiteliste setsockopt(hListenSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&nOne, sizeof(int)); #endif // Allow binding if the port is still in TIME_WAIT state after - // the program was closed and restarted. Not an issue on windows! + // the program was closed and restarted. setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEADDR, (void*)&nOne, sizeof(int)); +#else + setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEADDR, (const char*)&nOne, sizeof(int)); #endif // Set to non-blocking, incoming connections will also inherit this |