nimsuggest: fix tcp socket leak for epc backend (#12384) [backport]

Same as e9fa4c9b9c, 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.
This commit is contained in:
alaviss
2019-10-08 12:14:18 +00:00
committed by Andreas Rumpf
parent 7c23522b29
commit edb24b7ce0

View File

@@ -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: