Skip to content

Commit 37a6416

Browse files
committed
remove headers timeout hack, rely on nodejs timeouts (#83419)
1 parent 495fc8b commit 37a6416

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

src/core/server/http/http_tools.ts

-4
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,6 @@ interface ListenerOptions {
103103
export function createServer(serverOptions: ServerOptions, listenerOptions: ListenerOptions) {
104104
const server = new Server(serverOptions);
105105

106-
// remove fix + test as soon as update node.js to v12.19 https://github.com/elastic/kibana/pull/61587
107-
server.listener.headersTimeout =
108-
listenerOptions.keepaliveTimeout + 2 * server.listener.headersTimeout;
109-
110106
server.listener.keepAliveTimeout = listenerOptions.keepaliveTimeout;
111107
server.listener.setTimeout(listenerOptions.socketTimeout);
112108
server.listener.on('timeout', (socket) => {

test/server_integration/http/platform/headers.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default function ({ getService }: FtrProviderContext) {
3131
const config = getService('config');
3232

3333
describe('headers timeout ', () => {
34-
it('issue-73849', async () => {
34+
it('handles correctly. See issue #73849', async () => {
3535
const agent = new Http.Agent({
3636
keepAlive: true,
3737
});
@@ -74,7 +74,7 @@ export default function ({ getService }: FtrProviderContext) {
7474
}
7575

7676
await performRequest();
77-
const defaultHeadersTimeout = 40 * oneSec;
77+
const defaultHeadersTimeout = 60 * oneSec;
7878
await delay(defaultHeadersTimeout + oneSec);
7979
await performRequest();
8080
});

0 commit comments

Comments
 (0)