1
0
Fork 0
mirror of https://github.com/documize/community.git synced 2025-07-19 13:19:43 +02:00

Bumped database driver dependencies

Latest used for MySQL, SQL Server and PostgreSQL
This commit is contained in:
sauls8t 2019-08-15 14:51:40 +01:00
parent ffacf17c5f
commit 32dbab826d
31 changed files with 2431 additions and 1611 deletions

View file

@ -149,22 +149,21 @@ func (mc *mysqlConn) watchCancel(ctx context.Context) error {
mc.cleanup()
return nil
}
// When ctx is already cancelled, don't watch it.
if err := ctx.Err(); err != nil {
return err
}
// When ctx is not cancellable, don't watch it.
if ctx.Done() == nil {
return nil
}
mc.watching = true
select {
default:
case <-ctx.Done():
return ctx.Err()
}
// When watcher is not alive, can't watch it.
if mc.watcher == nil {
return nil
}
mc.watching = true
mc.watcher <- ctx
return nil
}