We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fefef0 commit bf7f34fCopy full SHA for bf7f34f
driver.go
@@ -66,11 +66,6 @@ func (d MySQLDriver) Open(dsn string) (driver.Conn, error) {
66
mc.parseTime = mc.cfg.ParseTime
67
mc.strict = mc.cfg.Strict
68
69
- // Call startWatcher for context support (From Go 1.8)
70
- if s, ok := interface{}(mc).(watcher); ok {
71
- s.startWatcher()
72
- }
73
-
74
// Connect to Server
75
if dial, ok := dials[mc.cfg.Net]; ok {
76
mc.netConn, err = dial(mc.cfg.Addr)
@@ -92,6 +87,11 @@ func (d MySQLDriver) Open(dsn string) (driver.Conn, error) {
92
87
}
93
88
94
89
90
+ // Call startWatcher for context support (From Go 1.8)
91
+ if s, ok := interface{}(mc).(watcher); ok {
+ s.startWatcher()
+ }
+
95
mc.buf = newBuffer(mc.netConn)
96
97
// Set I/O timeouts
0 commit comments