From edb24b7ce0882faaaec406f20c70723ac653ca2e Mon Sep 17 00:00:00 2001 From: alaviss Date: Tue, 8 Oct 2019 12:14:18 +0000 Subject: [PATCH] nimsuggest: fix tcp socket leak for epc backend (#12384) [backport] Same as e9fa4c9b9c8e2926449399a69a02676936bb842c, but for the epc backend which is used by emacs and vscode plugin. Since the EPC backend only deal with one connection per nimsuggest instance, only one socket is leaked, thus not as servere as with the tcp backend. --- nimsuggest/nimsuggest.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nimsuggest/nimsuggest.nim b/nimsuggest/nimsuggest.nim index b61dfe797e..aa45a64e9a 100644 --- a/nimsuggest/nimsuggest.nim +++ b/nimsuggest/nimsuggest.nim @@ -353,7 +353,7 @@ proc replEpc(x: ThreadParams) {.thread.} = echo port stdout.flushFile() - var client = newSocket() + var client: Socket # Wait for connection accept(server, client) while true: