Temporarily remove timeout logic from HTTPServer

orm-types
Garrett Mills 2 years ago
parent 795adac68b
commit 10b3e1ecc3

@ -1,6 +1,6 @@
{ {
"name": "@extollo/lib", "name": "@extollo/lib",
"version": "0.9.11", "version": "0.9.12",
"description": "The framework library that lifts up your code.", "description": "The framework library that lifts up your code.",
"main": "lib/index.js", "main": "lib/index.js",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",

@ -87,13 +87,13 @@ export class HTTPServer extends Unit {
public get handler(): RequestListener { public get handler(): RequestListener {
// const timeout = this.config.get('server.timeout', 10000) // const timeout = this.config.get('server.timeout', 10000)
const timeout = 0 // temporarily disable this because it is causing problems // const timeout = 0 // temporarily disable this because it is causing problems
return async (request: IncomingMessage, response: ServerResponse) => { return async (request: IncomingMessage, response: ServerResponse) => {
const extolloReq = new Request(request, response) const extolloReq = new Request(request, response)
await this.requestLocalStorage.run(extolloReq, async () => { await this.requestLocalStorage.run(extolloReq, async () => {
withTimeout(timeout, extolloReq.response.sent$.toPromise()) /* withTimeout(timeout, extolloReq.response.sent$.toPromise())
.onTime(() => { .onTime(() => {
this.logging.verbose(`Request lifecycle finished on time. (Path: ${extolloReq.path})`) this.logging.verbose(`Request lifecycle finished on time. (Path: ${extolloReq.path})`)
}) })
@ -114,7 +114,7 @@ export class HTTPServer extends Unit {
extolloReq.response.send() extolloReq.response.send()
}) })
.run() .run()
.catch(e => this.logging.error(e)) .catch(e => this.logging.error(e))*/
try { try {
await this.kernel.handle(extolloReq) await this.kernel.handle(extolloReq)

Loading…
Cancel
Save