We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a972bb4 + dbaed31 commit 2be0eb6Copy full SHA for 2be0eb6
lib/connection.js
@@ -227,11 +227,15 @@ class Connection extends EventEmitter {
227
}
228
229
write(buffer) {
230
- this.stream.write(buffer, err => {
+ const result = this.stream.write(buffer, err => {
231
if (err) {
232
this._handleNetworkError(err);
233
234
});
235
+
236
+ if (!result) {
237
+ this.stream.emit('pause');
238
+ }
239
240
241
// http://dev.mysql.com/doc/internals/en/sequence-id.html
0 commit comments