Stop fallback in case of invalid password
This commit is contained in:
committed by
Jack Christensen
parent
70be4b4a02
commit
b6027e37f4
@@ -152,6 +152,10 @@ func ConnectConfig(ctx context.Context, config *Config) (pgConn *PgConn, err err
|
|||||||
break
|
break
|
||||||
} else if pgerr, ok := err.(*PgError); ok {
|
} else if pgerr, ok := err.(*PgError); ok {
|
||||||
err = &connectError{config: config, msg: "server error", err: pgerr}
|
err = &connectError{config: config, msg: "server error", err: pgerr}
|
||||||
|
ERRCODE_INVALID_PASSWORD := "28P01"
|
||||||
|
if pgerr.Code == ERRCODE_INVALID_PASSWORD {
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user