ctucx.git: nimhafas

[nimlang] hafas-client library

commit 1909376e6c33d9b5c1f56139fe53e6866692dde0
parent 7b51b8ef3145ff6adcd533a42265585aa3506c41
Author: Leah (ctucx) <leah@ctu.cx>
Date: Wed, 28 Jul 2021 17:00:23 +0200

bugfix: close connection after response
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/nimhafas/util.nim b/nimhafas/util.nim
@@ -49,6 +49,7 @@ proc request*(req: JsonNode): Future[JsonNode] {.async.} =
   let req = await client.request(url, httpMethod = HttpPost, body = $body)
   let resp = await req.body
   let data = parseJson(resp)
+  client.close
 
   let error = data{"svcResL"}{0}{"err"}.getStr()
   if error != "OK":