From: Ben Darnell Date: Sun, 1 Feb 2015 15:52:30 +0000 (-0500) Subject: Silence a warning on freebsd. X-Git-Tag: v4.1.0b2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb4649e5b27af5bb51cce9845bc1c80e3017b841;p=thirdparty%2Ftornado.git Silence a warning on freebsd. This was already changed for other platforms but the error behaves a bit differently on freebsd. --- diff --git a/tornado/iostream.py b/tornado/iostream.py index 640198d87..cdb6250b9 100644 --- a/tornado/iostream.py +++ b/tornado/iostream.py @@ -1039,8 +1039,9 @@ class IOStream(BaseIOStream): # reported later in _handle_connect. if (errno_from_exception(e) not in _ERRNO_INPROGRESS and errno_from_exception(e) not in _ERRNO_WOULDBLOCK): - gen_log.warning("Connect error on fd %s: %s", - self.socket.fileno(), e) + if future is None: + gen_log.warning("Connect error on fd %s: %s", + self.socket.fileno(), e) self.close(exc_info=True) return future self._add_io_state(self.io_loop.WRITE)