Browse Source

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)
0.13
Wladimir J. van der Laan 9 years ago
parent
commit
981fd92bc5
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 5
      qa/pull-tester/rpc-tests.sh
  2. 4
      src/net.cpp

5
qa/pull-tester/rpc-tests.sh

@ -8,11 +8,6 @@ CURDIR=$(cd $(dirname "$0"); pwd) @@ -8,11 +8,6 @@ CURDIR=$(cd $(dirname "$0"); pwd)
export BITCOINCLI=${BUILDDIR}/qa/pull-tester/run-bitcoin-cli
export BITCOIND=${REAL_BITCOIND}
if [ "x${EXEEXT}" = "x.exe" ]; then
echo "Win tests currently disabled"
exit 0
fi
#Run the tests
testScripts=(

4
src/net.cpp

@ -1625,8 +1625,10 @@ bool BindListenPort(const CService &addrBind, string& strError, bool fWhiteliste @@ -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

Loading…
Cancel
Save