]> Cypherpunks.ru repositories - nncp.git/blobdiff - src/sp.go
Fix onlinedeadline workability of pipes
[nncp.git] / src / sp.go
index 4f522c9b52ac1512fd70941090f430d88b0b1f43..aca6f18c1824caf6d5908609b88c22841cb29c59 100644 (file)
--- a/src/sp.go
+++ b/src/sp.go
@@ -22,7 +22,6 @@ import (
        "crypto/subtle"
        "errors"
        "io"
-       "net"
        "os"
        "path/filepath"
        "sort"
@@ -767,8 +766,7 @@ func (state *SPState) StartWorkers(
                                        break
                                }
                                unmarshalErr := err.(*xdr.UnmarshalError)
-                               netErr, ok := unmarshalErr.Err.(net.Error)
-                               if ok && netErr.Timeout() {
+                               if os.IsTimeout(unmarshalErr.Err) {
                                        continue
                                }
                                if unmarshalErr.ErrorCode == xdr.ErrIO {