Skip to content

Commit bfd40d6

Browse files
authored
fix net.Error check (#445)
1 parent bcd4f2c commit bfd40d6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ func (server *FtpServer) handleAcceptError(err error, tempDelay *time.Duration)
254254
// The temporaryError method should replace net.Error.Temporary() when the go team
255255
// will have provided us a better way to detect temporary errors.
256256
var ne net.Error
257-
if errors.Is(err, ne) && ne.Temporary() { //nolint:staticcheck
257+
if errors.As(err, &ne) && ne.Temporary() { //nolint:staticcheck
258258
if *tempDelay == 0 {
259259
*tempDelay = 5 * time.Millisecond
260260
} else {

0 commit comments

Comments
 (0)