mirror of
https://github.com/brianc/node-postgres.git
synced 2026-01-18 15:55:05 +00:00
Set noDelay to true
This commit is contained in:
parent
520bd35319
commit
08afb12dcc
@ -39,6 +39,7 @@ Connection.prototype.connect = function (port, host) {
|
||||
var self = this
|
||||
|
||||
this._connecting = true
|
||||
this.stream.setNoDelay(true)
|
||||
this.stream.connect(port, host)
|
||||
|
||||
this.stream.once('connect', function () {
|
||||
|
||||
@ -5,6 +5,7 @@ var Client = require(__dirname + '/../../../lib/client')
|
||||
|
||||
test('emits end when not in query', function () {
|
||||
var stream = new (require('events').EventEmitter)()
|
||||
stream.setNoDelay = () => {}
|
||||
stream.connect = function () {
|
||||
// NOOP
|
||||
}
|
||||
|
||||
@ -17,6 +17,8 @@ p.connect = function () {
|
||||
// NOOP
|
||||
}
|
||||
|
||||
p.setNoDelay = () => {}
|
||||
|
||||
p.write = function (packet, cb) {
|
||||
this.packets.push(packet)
|
||||
if (cb) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user