Skip to content

Commit bc5856c

Browse files
authored
Merge pull request #79 from jterrace/windows-tests
Fix unit test on Windows.
2 parents bdd021f + 1677065 commit bc5856c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/test_probing.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ def mock_register(selector, rsock, evtmask):
1717
global sck
1818
# The Probe is sent multicast, we use that to identify the right socket.
1919
# Identification could be done better, but this is enough for now.
20-
if rsock.getsockname()[1] == MULTICAST_PORT:
20+
if (rsock.proto == socket.IPPROTO_UDP and
21+
rsock.getsockname()[1] == MULTICAST_PORT):
2122
sck = rsock
2223

2324
def mock_select(*args):

0 commit comments

Comments
 (0)