Skip to content

Commit

Permalink
fix: use correct argument order to errors.Is
Browse files Browse the repository at this point in the history
  • Loading branch information
smlx committed Aug 16, 2024
1 parent 934322c commit 39bed82
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion internal/sshserver/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func Serve(
log.Warn("couldn't shutdown cleanly", slog.Any("error", err))
}
}()
if err := srv.Serve(l); !errors.Is(ssh.ErrServerClosed, err) {
if err := srv.Serve(l); !errors.Is(err, ssh.ErrServerClosed) {
return err
}
return nil
Expand Down
2 changes: 1 addition & 1 deletion internal/sshtoken/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func Serve(
log.Warn("couldn't shutdown cleanly", slog.Any("error", err))
}
}()
if err := srv.Serve(l); !errors.Is(ssh.ErrServerClosed, err) {
if err := srv.Serve(l); !errors.Is(err, ssh.ErrServerClosed) {
return err
}
return nil
Expand Down

0 comments on commit 39bed82

Please sign in to comment.