Closed
Description
Issue description
the ctx for dial or DialContext shall some context that from cfg.Timeout // Dial timeout,
but not the context from open.
Example code
connector.go
/ Connect implements driver.Connector interface.
// Connect returns a connection to the database.
func (c *connector) Connect(ctx context.Context) (driver.Conn, error) {
...
if ok {
mc.netConn, err = dial(ctx, mc.cfg.Addr)
} else {
nd := net.Dialer{Timeout: mc.cfg.Timeout}
mc.netConn, err = nd.DialContext(ctx, mc.cfg.Net, mc.cfg.Addr)
}
...
Error log
n/a
Configuration
current master b4242ba
Metadata
Metadata
Assignees
Labels
No labels