Skip to content

Commit

Permalink
fix net.Error check (#445)
Browse files Browse the repository at this point in the history
  • Loading branch information
drakkan authored Apr 5, 2024
1 parent bcd4f2c commit bfd40d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func (server *FtpServer) handleAcceptError(err error, tempDelay *time.Duration)
// The temporaryError method should replace net.Error.Temporary() when the go team
// will have provided us a better way to detect temporary errors.
var ne net.Error
if errors.Is(err, ne) && ne.Temporary() { //nolint:staticcheck
if errors.As(err, &ne) && ne.Temporary() { //nolint:staticcheck
if *tempDelay == 0 {
*tempDelay = 5 * time.Millisecond
} else {
Expand Down

0 comments on commit bfd40d6

Please sign in to comment.