From 60a53eea9992290395195a9b1bee388f6aa8cfa5 Mon Sep 17 00:00:00 2001 From: cheatfate Date: Sat, 20 Feb 2021 19:41:22 +0200 Subject: [PATCH] Fix import/export issue of httputils. Add bound address to HttpServer object. --- chronos/apps/http/httpserver.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chronos/apps/http/httpserver.nim b/chronos/apps/http/httpserver.nim index c02fef8..7d02078 100644 --- a/chronos/apps/http/httpserver.nim +++ b/chronos/apps/http/httpserver.nim @@ -11,8 +11,8 @@ import stew/results, httputils import ../../asyncloop, ../../asyncsync import ../../streams/[asyncstream, boundstream, chunkstream, tlsstream] import httptable, httpcommon, multipart -export httptable, httpcommon, multipart, tlsstream, asyncstream, uri, tables, - options, results +export httptable, httpcommon, httputils, multipart, tlsstream, asyncstream, + uri, tables, options, results type HttpServerFlags* {.pure.} = enum @@ -47,6 +47,7 @@ type HttpServer* = object of RootObj instance*: StreamServer + address*: TransportAddress # semaphore*: AsyncSemaphore maxConnections*: int backlogSize: int @@ -135,6 +136,7 @@ proc new*(htype: typedesc[HttpServerRef], return err("PrivateKey or Certificate is missing") var res = HttpServerRef( + address: address, maxConnections: maxConnections, headersTimeout: httpHeadersTimeout, maxHeadersSize: maxHeadersSize,