File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
backend/src/features/telnet Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,13 @@ export class TelnetClient extends EventEmitter<TelnetClientEvents> {
148148
149149 this . telnetSocket . on ( 'close' , ( hadErrors ) => this . handleClose ( hadErrors ) ) ;
150150
151+ this . telnetSocket . on ( 'error' , ( error : Error ) => {
152+ logger . error (
153+ `[${ this . socketId } ] [Telnet-Client] Socket error (will close connection): ${ error . message } ` ,
154+ { error } ,
155+ ) ;
156+ } ) ;
157+
151158 this . telnetSocket . on ( 'do' , ( option ) => this . handleDo ( option ) ) ;
152159
153160 this . telnetSocket . on ( 'dont' , ( option ) => this . handleDont ( option ) ) ;
@@ -586,5 +593,8 @@ function createTelnetConnection(
586593 } ) ;
587594 }
588595
596+ // Keep-alive helps avoid idle disconnects on intermediate proxies/LBs
597+ socket . setKeepAlive ( true , 60_000 ) ;
598+
589599 return socket ;
590600}
You can’t perform that action at this time.
0 commit comments