diff --git a/presto/client.nim b/presto/client.nim index 5d96bd2..887d8c6 100644 --- a/presto/client.nim +++ b/presto/client.nim @@ -169,12 +169,12 @@ proc new*(t: typedesc[RestClientRef], bufferSize: int = 4096, userAgent = PrestoIdent, socketFlags: set[SocketFlags] = {} - ): RestResult[RestClientRef] = + ): RestClientRef = let session = HttpSessionRef.new(httpFlags, maxRedirections, connectTimeout, headersTimeout, bufferSize, maxConnections, idleTimeout, idlePeriod, socketFlags) - ok(RestClientRef(session: session, address: address, agent: userAgent, - flags: flags)) + RestClientRef(session: session, address: address, agent: userAgent, + flags: flags) proc new*(t: typedesc[RestClientRef], ta: TransportAddress, diff --git a/presto/serverprivate.nim b/presto/serverprivate.nim index 5ccfeea..b6046b6 100644 --- a/presto/serverprivate.nim +++ b/presto/serverprivate.nim @@ -69,7 +69,7 @@ when defined(metrics): endpoint = $route.routePath icode = toInt(code) scode = Base10.toString(uint64(toInt(code))) - presto_client_response_status_count.inc(1, @[endpoint, scode]) + presto_server_response_status_count.inc(1, @[endpoint, scode]) proc processStatusMetrics(route: RestRoute, code: HttpCode, duration: Duration) =