diff --git a/src/connection/adapter/base_http_adapter.ts b/src/connection/adapter/base_http_adapter.ts index ee25195d..5aa22dfc 100644 --- a/src/connection/adapter/base_http_adapter.ts +++ b/src/connection/adapter/base_http_adapter.ts @@ -115,7 +115,9 @@ export abstract class BaseHttpAdapter implements Connection { const start = Date.now() const request = this.createClientRequest(params.url, params) - + request.once('socket', (socket) => { + socket.setTimeout(this.config.request_timeout) + }) function onError(err: Error): void { removeRequestListeners() reject(err)