Skip to content

Commit b05f16e

Browse files
committed
Start listening before run test
1 parent 2aa718b commit b05f16e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/mockserver.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ def __init__(self, host='localhost', port=24224):
2323
else:
2424
self._sock = socket.socket()
2525
self._sock.bind((host, port))
26+
self._sock.listen(1)
2627
self._buf = BytesIO()
2728

2829
threading.Thread.__init__(self)
2930
self.start()
3031

3132
def run(self):
3233
sock = self._sock
33-
sock.listen(1)
3434
con, _ = sock.accept()
3535
while True:
3636
data = con.recv(4096)

0 commit comments

Comments
 (0)