@@ -445,26 +445,26 @@ func (a *agent) createTailnet(ctx context.Context, derpMap *tailcfg.DERPMap) (_
445
445
}
446
446
_ = conn .Close ()
447
447
})
448
- // This cannot use a JSON decoder, since that can
449
- // buffer additional data that is required for the PTY.
450
- rawLen := make ([]byte , 2 )
451
- _ , err = conn .Read (rawLen )
452
- if err != nil {
453
- continue
454
- }
455
- length := binary .LittleEndian .Uint16 (rawLen )
456
- data := make ([]byte , length )
457
- _ , err = conn .Read (data )
458
- if err != nil {
459
- continue
460
- }
461
- var msg codersdk.ReconnectingPTYInit
462
- err = json .Unmarshal (data , & msg )
463
- if err != nil {
464
- continue
465
- }
466
448
_ = a .trackConnGoroutine (func () {
467
449
defer close (closed )
450
+ // This cannot use a JSON decoder, since that can
451
+ // buffer additional data that is required for the PTY.
452
+ rawLen := make ([]byte , 2 )
453
+ _ , err = conn .Read (rawLen )
454
+ if err != nil {
455
+ return
456
+ }
457
+ length := binary .LittleEndian .Uint16 (rawLen )
458
+ data := make ([]byte , length )
459
+ _ , err = conn .Read (data )
460
+ if err != nil {
461
+ return
462
+ }
463
+ var msg codersdk.ReconnectingPTYInit
464
+ err = json .Unmarshal (data , & msg )
465
+ if err != nil {
466
+ return
467
+ }
468
468
_ = a .handleReconnectingPTY (ctx , logger , msg , conn )
469
469
})
470
470
}
0 commit comments