forked from quic-go/quic-go
implement net.Error interface for stream deadline expiration errors
This commit is contained in:
10
stream.go
10
stream.go
@@ -1,9 +1,9 @@
|
||||
package quic
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
@@ -55,7 +55,13 @@ type stream struct {
|
||||
flowControlManager flowcontrol.FlowControlManager
|
||||
}
|
||||
|
||||
var errDeadline = errors.New("deadline exceeded")
|
||||
type deadlineError struct{}
|
||||
|
||||
func (deadlineError) Error() string { return "deadline exceeded" }
|
||||
func (deadlineError) Temporary() bool { return true }
|
||||
func (deadlineError) Timeout() bool { return true }
|
||||
|
||||
var errDeadline net.Error = &deadlineError{}
|
||||
|
||||
// newStream creates a new Stream
|
||||
func newStream(StreamID protocol.StreamID,
|
||||
|
||||
Reference in New Issue
Block a user