mirror of
https://github.com/sprockets/sprockets.mixins.metrics.git
synced 2024-11-22 03:00:25 +00:00
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:
parent
f24bc7c065
commit
c4dd176ab3
1 changed files with 1 additions and 5 deletions
|
@ -128,7 +128,7 @@ class StatsDCollector:
|
||||||
"""
|
"""
|
||||||
sock = iostream.IOStream(socket.socket(
|
sock = iostream.IOStream(socket.socket(
|
||||||
socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP))
|
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)
|
sock.set_close_callback(self._tcp_on_closed)
|
||||||
return sock
|
return sock
|
||||||
|
|
||||||
|
@ -139,10 +139,6 @@ class StatsDCollector:
|
||||||
await asyncio.sleep(self._tcp_reconnect_sleep)
|
await asyncio.sleep(self._tcp_reconnect_sleep)
|
||||||
self._sock = self._tcp_socket()
|
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):
|
def send(self, path, value, metric_type):
|
||||||
"""Send a metric to Statsd.
|
"""Send a metric to Statsd.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue