about summary refs log tree commit diff stats
path: root/src/loader
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-02-23 01:43:56 +0100
committerbptato <nincsnevem662@gmail.com>2024-02-23 01:45:31 +0100
commit897e403c49fe71addbddd6da0784e399c62c9a32 (patch)
treece32c371e484eed55c2e519aaf99991a420c8391 /src/loader
parent05dc6191feb1f14423de9ee12eef6728e2839f69 (diff)
downloadchawan-897e403c49fe71addbddd6da0784e399c62c9a32.tar.gz
buffer: improve cancel, use _exit, misc cleanups
* cancel resources on cancel() call
* call _exit in signal handler (also in loader)
* misc cleanups
Diffstat (limited to 'src/loader')
-rw-r--r--src/loader/loader.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/loader/loader.nim b/src/loader/loader.nim
index 3c974c95..39dedf7d 100644
--- a/src/loader/loader.nim
+++ b/src/loader/loader.nim
@@ -68,12 +68,12 @@ type
 
   ConnectData = object
     promise: Promise[JSResult[Response]]
-    stream: SocketStream
+    stream*: SocketStream
     request: Request
 
   OngoingData = object
     buf: string
-    response: Response
+    response*: Response
     bodyRead: Promise[string]
 
   LoaderCommand = enum
@@ -437,7 +437,7 @@ proc exitLoader(ctx: LoaderContext) =
   ctx.ssock.close()
   for path in ctx.cacheMap.values:
     discard unlink(cstring(path))
-  quit(0)
+  exitnow(1)
 
 var gctx: LoaderContext
 proc initLoaderContext(fd: cint, config: LoaderConfig): LoaderContext =