[CherryPy] #1088: SO_REUSEADDR should not be used on windows

12 views
Skip to first unread message

CherryPy

unread,
Aug 30, 2011, 5:31:38 AM8/30/11
to cherrypy...@googlegroups.com
#1088: SO_REUSEADDR should not be used on windows
-----------------------------------+----------------------------------------
Reporter: kris...@ccpgames.com | Owner: fumanchu
Type: defect | Status: new
Priority: normal | Milestone:
Component: wsgiserver | Keywords:
-----------------------------------+----------------------------------------
The standard idiom of creating a socket with SO_REUSEADDR before binding,
should not be done on windows. The meaning of this socket option is quite
different on windows. On windows, the default behaviour is as though
SO_REUSEADDR had been specified on unix.
If this flag is specified, it is possible to bind to a port that is
actually _in use_.
See for example this discussion from twisted:
http://twistedmatrix.com/trac/ticket/1151

And this documentaton on the flag and its windows specific colleagues:
http://msdn.microsoft.com/en-us/library/ms740621(v=vs.85).aspx

--
Ticket URL: <http://www.cherrypy.org/ticket/1088>
CherryPy <http://www.cherrypy.org>
CherryPy - a pythonic, object-oriented HTTP framework

CherryPy

unread,
Aug 30, 2011, 8:31:21 AM8/30/11
to cherrypy...@googlegroups.com
#1088: SO_REUSEADDR should not be used on windows
-----------------------------------+----------------------------------------
Reporter: kris...@ccpgames.com | Owner: fumanchu
Type: defect | Status: new
Priority: normal | Milestone: 3.2
Component: wsgiserver | Resolution:
Keywords: |
-----------------------------------+----------------------------------------
Changes (by kris...@ccpgames.com):

* milestone: => 3.2
Reply all
Reply to author
Forward
0 new messages