Skip to content

Commit 787a8e1

Browse files
committed
Explicitly shutdown the socket connection in Udp/TcpTransport
This prevents 'Connection reset' errors on the Logstash side.
1 parent 98b11d5 commit 787a8e1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

logstash_async/transport.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ def _close(self, force=False):
128128
if self._sock:
129129
while not self._is_sock_write_buff_empty():
130130
time.sleep(0.05)
131+
self._sock.shutdown(socket.SHUT_WR)
131132
self._sock.close()
132133
self._sock = None
133134

0 commit comments

Comments
 (0)