Skip to content

Commit 86b1f25

Browse files
committed
Disable socket timeouts for streaming
1 parent e1892fd commit 86b1f25

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/lib/streamSessions/StreamSession.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,10 @@ export default class StreamSession extends EventEmitter {
100100

101101
if (destination.type === 'http') {
102102
destination.stream.writeHead(this.httpStatusCode, this.httpHeaders);
103+
// Disable the socket timeout for long-lived streaming connections
104+
if (typeof destination.stream.setTimeout === 'function') {
105+
destination.stream.setTimeout(0);
106+
}
103107
}
104108

105109
destination.stream

0 commit comments

Comments
 (0)