Skip to content

Commit

Permalink
Check for nil connection after timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-soltesz committed Jul 19, 2019
1 parent d9ebeca commit a1077a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ndt5/singleserving/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ func (ps *plainServer) ServeOnce(ctx context.Context) (protocol.MeasuredConnecti
if err != nil {
return nil, err
}
if conn == nil {
return nil, errors.New("nil conn, nil err: " + derivedCtx.Err().Error())
}
return protocol.AdaptNetConn(conn, conn), nil
}

Expand Down

0 comments on commit a1077a7

Please sign in to comment.