Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fc4e97d

Browse files
committed
Remove data race on err variable in agent
Signed-off-by: Spike Curtis <[email protected]>
1 parent ab6594b commit fc4e97d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

agent/agent.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -453,8 +453,8 @@ func (a *agent) handleSSHSession(session ssh.Session) (retErr error) {
453453
}
454454
go func() {
455455
for win := range windowSize {
456-
err = ptty.Resize(uint16(win.Height), uint16(win.Width))
457-
if err != nil {
456+
resizeErr := ptty.Resize(uint16(win.Height), uint16(win.Width))
457+
if resizeErr != nil {
458458
a.logger.Warn(context.Background(), "failed to resize tty", slog.Error(err))
459459
}
460460
}

0 commit comments

Comments
 (0)