fix grpc dialer
This commit is contained in:
parent
4c1da3e4d4
commit
8098e9f976
@ -91,7 +91,7 @@ func (c *http2Connector) Connect(ctx context.Context, conn net.Conn, network, ad
|
||||
}
|
||||
|
||||
client := v.GetMetadata().Get("client").(*http.Client)
|
||||
resp, err := client.Do(req.WithContext(ctx))
|
||||
resp, err := client.Do(req)
|
||||
if err != nil {
|
||||
log.Error(err)
|
||||
conn.Close()
|
||||
|
@ -99,7 +99,7 @@ func (d *grpcDialer) Dial(ctx context.Context, addr string, opts ...dialer.DialO
|
||||
d.clients[addr] = client
|
||||
}
|
||||
|
||||
cli, err := client.TunnelX(ctx, d.md.path)
|
||||
cli, err := client.TunnelX(context.Background(), d.md.path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ func (c *conn) Close() error {
|
||||
}
|
||||
|
||||
func (c *conn) LocalAddr() net.Addr {
|
||||
return c.raddr
|
||||
return c.laddr
|
||||
}
|
||||
|
||||
func (c *conn) RemoteAddr() net.Addr {
|
||||
|
Loading…
Reference in New Issue
Block a user