Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

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

Created:
Jan. 25, 2016, 6:57 p.m. by Thomas Greiner
Modified:
Feb. 2, 2016, 10:54 a.m.
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
Jan. 25, 2016, 6:59 p.m. (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 ...
Jan. 29, 2016, 1:38 p.m. (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: > ...
Jan. 29, 2016, 6:18 p.m. (2016-01-29 18:18:55 UTC) #3
saroyanm
LGTM
Feb. 1, 2016, 9:38 a.m. (2016-02-01 09:38:15 UTC) #4
Sebastian Noack
Feb. 2, 2016, 10:54 a.m. (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.

Powered by Google App Engine
This is Rietveld