mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user