Mercurial > dropbear
comparison test/test_dropbear.py @ 1879:81991ded740f
test: Set allow_reuse_addr
This avoids intermittent "Address already in use" failure
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 15 Mar 2022 15:38:46 +0800 |
parents | 0dcc5b0d93fa |
children |
comparison
equal
deleted
inserted
replaced
1878:d512da7b1198 | 1879:81991ded740f |
---|---|
70 | 70 |
71 # note: bash/zsh unix specific | 71 # note: bash/zsh unix specific |
72 return f"source {venv}/bin/activate" | 72 return f"source {venv}/bin/activate" |
73 | 73 |
74 class HandleTcp(socketserver.ThreadingMixIn, socketserver.TCPServer): | 74 class HandleTcp(socketserver.ThreadingMixIn, socketserver.TCPServer): |
75 | |
76 # override TCPServer's default, avoids TIME_WAIT | |
77 allow_reuse_addr = True | |
78 | |
75 """ Listens for a single incoming request, sends a response if given, | 79 """ Listens for a single incoming request, sends a response if given, |
76 and returns the inbound data. | 80 and returns the inbound data. |
77 Reponse can be a queue object, in which case each item in the queue will | 81 Reponse can be a queue object, in which case each item in the queue will |
78 be sent as a response, until it receives a None item. | 82 be sent as a response, until it receives a None item. |
79 """ | 83 """ |