Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ensure readyState is set before emitting

  • Loading branch information...
commit f81f4cca75285102e9dfc99527c9f705185e5e55 1 parent 15fc3ec
@aheckmann aheckmann authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/connection.js
View
2  lib/connection.js
@@ -179,11 +179,11 @@ Connection.prototype.open = function (host, database, port, options, callback) {
// open connection
this.doOpen(function (err) {
if (err) {
+ self.readyState = 0;
if (self._events && self._events.error &&
('function' == typeof self._events.error || self._events.error.length)) {
self.emit("error", err);
}
- self.readyState = 0;
} else {
self.onOpen();
}
Please sign in to comment.
Something went wrong with that request. Please try again.