Skip to content

Commit 981fd92

Browse files
committed
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)
2 parents da9beb2 + bd30c3d commit 981fd92

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

qa/pull-tester/rpc-tests.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ CURDIR=$(cd $(dirname "$0"); pwd)
88
export BITCOINCLI=${BUILDDIR}/qa/pull-tester/run-bitcoin-cli
99
export BITCOIND=${REAL_BITCOIND}
1010

11-
if [ "x${EXEEXT}" = "x.exe" ]; then
12-
echo "Win tests currently disabled"
13-
exit 0
14-
fi
15-
1611
#Run the tests
1712

1813
testScripts=(

src/net.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1625,8 +1625,10 @@ bool BindListenPort(const CService &addrBind, string& strError, bool fWhiteliste
16251625
setsockopt(hListenSocket, SOL_SOCKET, SO_NOSIGPIPE, (void*)&nOne, sizeof(int));
16261626
#endif
16271627
// Allow binding if the port is still in TIME_WAIT state after
1628-
// the program was closed and restarted. Not an issue on windows!
1628+
// the program was closed and restarted.
16291629
setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEADDR, (void*)&nOne, sizeof(int));
1630+
#else
1631+
setsockopt(hListenSocket, SOL_SOCKET, SO_REUSEADDR, (const char*)&nOne, sizeof(int));
16301632
#endif
16311633

16321634
// Set to non-blocking, incoming connections will also inherit this

0 commit comments

Comments
 (0)