mirror of
https://github.com/jackc/pgx.git
synced 2025-05-31 11:42:24 +00:00
Use writeError for Write error
This commit is contained in:
parent
06c4e181b1
commit
ac364e7a43
@ -683,7 +683,7 @@ func (pgConn *PgConn) Prepare(ctx context.Context, name, sql string, paramOIDs [
|
|||||||
n, err := pgConn.conn.Write(buf)
|
n, err := pgConn.conn.Write(buf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
pgConn.asyncClose()
|
pgConn.asyncClose()
|
||||||
return nil, &pgconnError{msg: "write failed", err: err, safeToRetry: n == 0}
|
return nil, &writeError{err: err, safeToRetry: n == 0}
|
||||||
}
|
}
|
||||||
|
|
||||||
psd := &StatementDescription{Name: name, SQL: sql}
|
psd := &StatementDescription{Name: name, SQL: sql}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user