mirror of
https://github.com/soheilhy/cmux.git
synced 2026-08-04 07:59:24 +08:00
SetReadDeadline for Matching
This commit is contained in:
@@ -20,6 +20,7 @@ import (
|
||||
"net"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"golang.org/x/net/http2"
|
||||
)
|
||||
@@ -43,6 +44,10 @@ func (c *mockConn) Read(b []byte) (n int, err error) {
|
||||
return c.r.Read(b)
|
||||
}
|
||||
|
||||
func (c *mockConn) SetReadDeadline(time.Time) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func discard(l net.Listener) {
|
||||
for {
|
||||
if _, err := l.Accept(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user