mirror of
https://github.com/nadoo/glider.git
synced 2026-11-23 23:49:41 +08:00
smux: return os.ErrDeadlineExceeded when timeout
This commit is contained in:
1 parent
e9e4515e67
commit
70cf30b5e6
4 files changed
+16
-8
No files matched your search
@@ -4,8 +4,10 @@ import (
|
||||
"container/heap"
|
||||
"encoding/binary"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"net"
|
||||
"os"
|
||||
"sync"
|
||||
"sync/atomic"
|
||||
"time"
|
||||
@@ -21,8 +23,9 @@ var (
|
||||
ErrInvalidProtocol = errors.New("invalid protocol")
|
||||
ErrConsumed = errors.New("peer consumed more than sent")
|
||||
ErrGoAway = errors.New("stream id overflows, should start a new connection")
|
||||
ErrTimeout = errors.New("timeout")
|
||||
ErrWouldBlock = errors.New("operation would block on IO")
|
||||
// ErrTimeout = errors.New("timeout")
|
||||
ErrTimeout = fmt.Errorf("smux: %w", os.ErrDeadlineExceeded)
|
||||
ErrWouldBlock = errors.New("operation would block on IO")
|
||||
)
|
||||
|
||||
type writeRequest struct {
|
||||
|
||||
Reference in new issue
Block a user