|
|
@ -152,6 +152,7 @@ function _write(chunk, encoding, callback) { |
|
|
|
/* Once a write fails, just call the callback immediately to let the caller |
|
|
|
/* Once a write fails, just call the callback immediately to let the caller |
|
|
|
flush any pending writes. */ |
|
|
|
flush any pending writes. */ |
|
|
|
setImmediate(callback); |
|
|
|
setImmediate(callback); |
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
try { |
|
|
|
try { |
|
|
|
message = this.serialize(chunk); |
|
|
|
message = this.serialize(chunk); |
|
|
@ -164,6 +165,7 @@ function _write(chunk, encoding, callback) { |
|
|
|
this.call.cancelWithStatus(constants.status.INTERNAL, |
|
|
|
this.call.cancelWithStatus(constants.status.INTERNAL, |
|
|
|
'Serialization failure'); |
|
|
|
'Serialization failure'); |
|
|
|
callback(e); |
|
|
|
callback(e); |
|
|
|
|
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
if (_.isFinite(encoding)) { |
|
|
|
if (_.isFinite(encoding)) { |
|
|
|
/* Attach the encoding if it is a finite number. This is the closest we |
|
|
|
/* Attach the encoding if it is a finite number. This is the closest we |
|
|
|