Remove unnecessary "on connect" callback.

This was removed in Tornado 6 when many of the other callbacks were
removed.  This was using the callback as the server hostname for SNI
purposes.  Luckily we aren't using SSL sockets here ;)
This commit is contained in:
Dave Shawley 2019-09-02 08:30:08 -04:00
parent f24bc7c065
commit c4dd176ab3

View file

@ -128,7 +128,7 @@ class StatsDCollector:
"""
sock = iostream.IOStream(socket.socket(
socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP))
sock.connect(self._address, self._tcp_on_connected)
sock.connect(self._address)
sock.set_close_callback(self._tcp_on_closed)
return sock
@ -139,10 +139,6 @@ class StatsDCollector:
await asyncio.sleep(self._tcp_reconnect_sleep)
self._sock = self._tcp_socket()
def _tcp_on_connected(self):
"""Invoked when the IOStream is connected"""
LOGGER.debug('Connected to statsd at %s via TCP', self._address)
def send(self, path, value, metric_type):
"""Send a metric to Statsd.