Skip to content
This repository has been archived by the owner on May 13, 2020. It is now read-only.

Commit

Permalink
Don't use SO_REUSEADDR on windows. It means something different there.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jim Fulton committed Jan 19, 2010
1 parent 44406c9 commit 1a55844
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/zc/ngi/async.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ def __init__(self, addr, handler):
family = socket.AF_INET
self.create_socket(family, socket.SOCK_STREAM)
try:
self.set_reuse_addr()
if sys.platform != 'win32':
self.set_reuse_addr()
self.logger.info("listening on %r", self.addr)
self.bind(addr)
self.listen(255)
Expand Down Expand Up @@ -438,7 +439,8 @@ def __init__(self, addr, handler, buffer_size=4096):
family = socket.AF_INET
try:
self.create_socket(family, socket.SOCK_DGRAM)
self.set_reuse_addr()
if sys.platform != 'win32':
self.set_reuse_addr()
self.logger.info("listening on udp %r", self.addr)
self.bind(addr)
except socket.error:
Expand Down

0 comments on commit 1a55844

Please sign in to comment.