Skip to content
This repository was archived by the owner on Nov 14, 2022. It is now read-only.

Commit 74fba91

Browse files
committed
close properly tcp connection on exception
1 parent 3c542e6 commit 74fba91

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dnstap_receiver/inputs/input_tcpclient.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ async def tcp_client(cfg, cfg_input, queues_list, stats, geoip_reader, cache):
8181
except asyncio.CancelledError:
8282
clogger.debug(f'Input handler: {peername} - closing connection.')
8383
writer.close()
84-
await writer.wait_closed()
8584
except asyncio.IncompleteReadError:
8685
clogger.debug(f'Input handler: {peername} - disconnected')
8786
finally:
87+
writer.close()
8888
clogger.debug(f'Input handler: {peername} - closed')
8989

9090
async def start_tcpclient(cfg, queues_list, stats, geoip_reader, cache):

0 commit comments

Comments
 (0)