Skip to content

Commit

Permalink
Merge pull request tornadoweb#1908 from takluyver/i1907
Browse files Browse the repository at this point in the history
Use errno_from_exception on error caught in Waker
  • Loading branch information
bdarnell authored Dec 13, 2016
2 parents 56cedff + b4b2451 commit d1571a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tornado/platform/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import time

from tornado.platform import interface

from tornado.util import errno_from_exception

def try_close(f):
# Avoid issue #875 (race condition when using the file in another
Expand Down Expand Up @@ -61,7 +61,7 @@ def __init__(self):
break # success
except socket.error as detail:
if (not hasattr(errno, 'WSAEADDRINUSE') or
detail[0] != errno.WSAEADDRINUSE):
errno_from_exception(detail) != errno.WSAEADDRINUSE):
# "Address already in use" is the only error
# I've seen on two WinXP Pro SP2 boxes, under
# Pythons 2.3.5 and 2.4.1.
Expand Down

0 comments on commit d1571a0

Please sign in to comment.