github.com/neatlab/neatio@v1.7.3-0.20220425043230-d903e92fcc75/network/p2p/netutil/error.go (about)

     1  package netutil
     2  
     3  func IsTemporaryError(err error) bool {
     4  	tempErr, ok := err.(interface {
     5  		Temporary() bool
     6  	})
     7  	return ok && tempErr.Temporary() || isPacketTooBig(err)
     8  }