|
|
|
@ -87,13 +87,13 @@ export class HTTPServer extends Unit {
|
|
|
|
|
|
|
|
|
|
public get handler(): RequestListener {
|
|
|
|
|
// 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) => {
|
|
|
|
|
const extolloReq = new Request(request, response)
|
|
|
|
|
|
|
|
|
|
await this.requestLocalStorage.run(extolloReq, async () => {
|
|
|
|
|
withTimeout(timeout, extolloReq.response.sent$.toPromise())
|
|
|
|
|
/* withTimeout(timeout, extolloReq.response.sent$.toPromise())
|
|
|
|
|
.onTime(() => {
|
|
|
|
|
this.logging.verbose(`Request lifecycle finished on time. (Path: ${extolloReq.path})`)
|
|
|
|
|
})
|
|
|
|
@ -114,7 +114,7 @@ export class HTTPServer extends Unit {
|
|
|
|
|
extolloReq.response.send()
|
|
|
|
|
})
|
|
|
|
|
.run()
|
|
|
|
|
.catch(e => this.logging.error(e))
|
|
|
|
|
.catch(e => this.logging.error(e))*/
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
await this.kernel.handle(extolloReq)
|
|
|
|
|