From f1120428792d7d76a2f73f88d298cf1097fc1765 Mon Sep 17 00:00:00 2001 From: Bizzonium Date: Fri, 23 Sep 2022 08:47:56 +0300 Subject: [PATCH] Feat: properly shutdown workerpools --- code/__DEFINES/rust_g.dm | 1 + code/__DEFINES/spaceman_dmm.dm | 1 + 2 files changed, 2 insertions(+) diff --git a/code/__DEFINES/rust_g.dm b/code/__DEFINES/rust_g.dm index 1c53e63577bdb..27b01a0a56141 100644 --- a/code/__DEFINES/rust_g.dm +++ b/code/__DEFINES/rust_g.dm @@ -128,6 +128,7 @@ #define rustg_http_request_blocking(method, url, body, headers, options) call(RUST_G, "http_request_blocking")(method, url, body, headers, options) #define rustg_http_request_async(method, url, body, headers, options) call(RUST_G, "http_request_async")(method, url, body, headers, options) #define rustg_http_check_request(req_id) call(RUST_G, "http_check_request")(req_id) +/proc/rustg_close_async_http_client() return call(RUST_G, "shutdown_http_client")() #define RUSTG_JOB_NO_RESULTS_YET "NO RESULTS YET" #define RUSTG_JOB_NO_SUCH_JOB "NO SUCH JOB" diff --git a/code/__DEFINES/spaceman_dmm.dm b/code/__DEFINES/spaceman_dmm.dm index 9b601ac8284ff..4d971cb0c4447 100644 --- a/code/__DEFINES/spaceman_dmm.dm +++ b/code/__DEFINES/spaceman_dmm.dm @@ -45,6 +45,7 @@ enable_debugging() /world/Del() + rustg_close_async_http_client() // Close the HTTP client. If you dont do this, youll get phantom threads which can crash DD from memory access violations var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL") if (debug_server) call(debug_server, "auxtools_shutdown")()