@@ -728,26 +728,28 @@ func (a *agent) handleReconnectingPTY(ctx context.Context, msg reconnectingPTYIn
728
728
if ok {
729
729
rpty , ok = rawRPTY .(* reconnectingPTY )
730
730
if ! ok {
731
- a .logger .Warn (ctx , "found invalid type in reconnecting pty map" , slog .F ("id" , msg .ID ))
731
+ a .logger .Error (ctx , "found invalid type in reconnecting pty map" , slog .F ("id" , msg .ID ))
732
+ return
732
733
}
733
734
} else {
734
735
// Empty command will default to the users shell!
735
736
cmd , err := a .createCommand (ctx , msg .Command , nil )
736
737
if err != nil {
737
- a .logger .Warn (ctx , "create reconnecting pty command" , slog .Error (err ))
738
+ a .logger .Error (ctx , "create reconnecting pty command" , slog .Error (err ))
738
739
return
739
740
}
740
741
cmd .Env = append (cmd .Env , "TERM=xterm-256color" )
741
742
742
- ptty , process , err := pty .Start (cmd )
743
+ // Default to buffer 64KiB.
744
+ circularBuffer , err := circbuf .NewBuffer (64 << 10 )
743
745
if err != nil {
744
- a .logger .Warn (ctx , "start reconnecting pty command" , slog .F ("id" , msg .ID ))
746
+ a .logger .Error (ctx , "create circular buffer" , slog .Error (err ))
747
+ return
745
748
}
746
749
747
- // Default to buffer 64KiB.
748
- circularBuffer , err := circbuf .NewBuffer (64 << 10 )
750
+ ptty , process , err := pty .Start (cmd )
749
751
if err != nil {
750
- a .logger .Warn (ctx , "create circular buffer " , slog .Error ( err ))
752
+ a .logger .Error (ctx , "start reconnecting pty command " , slog .F ( "id" , msg . ID ))
751
753
return
752
754
}
753
755
0 commit comments