Skip to content

chore: merge codeql checks to run in parallel #5907

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Jan 29, 2023
Merged
Prev Previous commit
Next Next commit
Fix closing when agent fails
  • Loading branch information
kylecarbs committed Jan 29, 2023
commit 74299878cc0065c79b2317ac7a2a288a87e8c56c
3 changes: 3 additions & 0 deletions agent/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -450,17 +450,20 @@ func (a *agent) createTailnet(ctx context.Context, derpMap *tailcfg.DERPMap) (_
rawLen := make([]byte, 2)
_, err = conn.Read(rawLen)
if err != nil {
close(closed)
continue
}
length := binary.LittleEndian.Uint16(rawLen)
data := make([]byte, length)
_, err = conn.Read(data)
if err != nil {
close(closed)
continue
}
var msg codersdk.ReconnectingPTYInit
err = json.Unmarshal(data, &msg)
if err != nil {
close(closed)
continue
}
_ = a.trackConnGoroutine(func() {
Expand Down