Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(277)

Issue 29334529: Issue 3572 - Allowed address reuse for test server (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
3 years, 11 months ago by Thomas Greiner
Modified:
3 years, 11 months ago
CC:
Felix Dahlke
Visibility:
Public.

Description

Issue 3572 - Allowed address reuse for test server

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1 line, -0 lines) Patch
M test_server.py View 1 1 chunk +1 line, -0 lines 1 comment Download

Messages

Total messages: 5
Thomas Greiner
3 years, 11 months ago (2016-01-25 18:59:08 UTC) #1
saroyanm
https://codereview.adblockplus.org/29334529/diff/29334530/test_server.py File test_server.py (right): https://codereview.adblockplus.org/29334529/diff/29334530/test_server.py#newcode25 test_server.py:25: httpd.allow_reuse_address = True You can declare the allow_reuse_address on ...
3 years, 11 months ago (2016-01-29 13:38:08 UTC) #2
Thomas Greiner
https://codereview.adblockplus.org/29334529/diff/29334530/test_server.py File test_server.py (right): https://codereview.adblockplus.org/29334529/diff/29334530/test_server.py#newcode25 test_server.py:25: httpd.allow_reuse_address = True On 2016/01/29 13:38:08, saroyanm wrote: > ...
3 years, 11 months ago (2016-01-29 18:18:55 UTC) #3
saroyanm
LGTM
3 years, 11 months ago (2016-02-01 09:38:15 UTC) #4
Sebastian Noack
3 years, 11 months ago (2016-02-02 10:54:21 UTC) #5
Message was sent while issue was closed.
https://codereview.adblockplus.org/29334529/diff/29335128/test_server.py
File test_server.py (right):

https://codereview.adblockplus.org/29334529/diff/29335128/test_server.py#newc...
test_server.py:24: SocketServer.TCPServer.allow_reuse_address = True
I'd rather not monkey-patch the corelib. This will have side effects when using
the TCPServer somewehre else. Sure, that's not much of a concern for a script as
small as this one, but still it's a hack. It would have been better to subclass
TCPServer overridding allow_reuse_address there.

Or even better, simply use BaseHTTPServer.HTTPServer which seems to be more
appropriate here anyway, and already has allow_reuse_address=1.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld 87257f5