Skip to content

Commit a40ed02

Browse files
committed
2026-05-28 16:51:56
1 parent e958cd8 commit a40ed02

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

protocol/etch/engine.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,13 @@ type Client struct {
194194

195195
// Dial connects to the address on the named network.
196196
func (c *Client) Dial(ctx *daze.Context, network string, address string) (io.ReadWriteCloser, error) {
197-
con, err := c.EpQuic.Dial(context.Background(), "udp", c.Server, ClientConfig.Do())
197+
cty, end := context.WithTimeout(context.Background(), daze.Conf.DialerTimeout)
198+
defer end()
199+
con, err := c.EpQuic.Dial(cty, "udp", c.Server, ClientConfig.Do())
198200
if err != nil {
199201
return nil, err
200202
}
201-
stm, err := con.NewStream(context.Background())
203+
stm, err := con.NewStream(cty)
202204
if err != nil {
203205
con.Close()
204206
return nil, err

0 commit comments

Comments
 (0)