diff options
author | bptato <nincsnevem662@gmail.com> | 2024-06-29 00:58:33 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-06-29 00:58:33 +0200 |
commit | 1b0eee9d62aab586ec7c79ed00f8b85d04e9afa1 (patch) | |
tree | 2fda71e5165d05e4ff1e36e2bfc1c25b5f50e4b3 /src/loader | |
parent | 8028c5a15a65dfdacb9ba8250c88e338546b49dc (diff) | |
download | chawan-1b0eee9d62aab586ec7c79ed00f8b85d04e9afa1.tar.gz |
loader: fix fd leaks
Diffstat (limited to 'src/loader')
-rw-r--r-- | src/loader/loader.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/loader/loader.nim b/src/loader/loader.nim index 11cf714f..78f5f0d7 100644 --- a/src/loader/loader.nim +++ b/src/loader/loader.nim @@ -642,6 +642,7 @@ proc suspend(ctx: LoaderContext; stream: SocketStream; client: ClientData; if output.registered: # do not waste cycles trying to push into output ctx.unregister(output) + stream.sclose() proc resume(ctx: LoaderContext; stream: SocketStream; client: ClientData; r: var BufferedReader) = @@ -652,6 +653,7 @@ proc resume(ctx: LoaderContext; stream: SocketStream; client: ClientData; if output != nil: output.suspended = false ctx.register(output) + stream.sclose() proc equalsConstantTime(a, b: ClientKey): bool = static: |