Fix: dial tcp with context to avoid margin of error

This commit is contained in:
Dreamacro
2019-10-12 23:55:39 +08:00
parent 0cdc40beb3
commit 7c4a359a2b
14 changed files with 47 additions and 30 deletions

View File

@ -1,6 +1,7 @@
package adapters
import (
"context"
"io"
"net"
"time"
@ -12,7 +13,7 @@ type Reject struct {
*Base
}
func (r *Reject) Dial(metadata *C.Metadata) (C.Conn, error) {
func (r *Reject) DialContext(ctx context.Context, metadata *C.Metadata) (C.Conn, error) {
return newConn(&NopConn{}, r), nil
}