Fix byte representation of CancelRequest message
I noticed that query cancellation was not working when connecting through pgbouncer, even though it worked fine when directly connected. This is because we're appending an extra null byte, and pgbouncer is strict about the packet length. (per http://www.postgresql.org/docs/9.1/static/protocol-message-formats.html) This removes the extraneous byte, which fixes cancellation against pgbouncer.
This commit is contained in:
parent
93aa52d43b
commit
eb7b15c623
@ -159,7 +159,7 @@ Connection.prototype.cancel = function(processID, secretKey) {
|
||||
.addInt16(5678)
|
||||
.addInt32(processID)
|
||||
.addInt32(secretKey)
|
||||
.addCString('').flush();
|
||||
.flush();
|
||||
|
||||
var length = bodyBuffer.length + 4;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user