Minor logic defect in error handling.
This commit is contained in:
Родитель
87b6de7826
Коммит
b5dc6aa98e
|
@ -367,7 +367,7 @@ Connection.prototype.destroyConnection = function(socket) {
|
|||
Connection.prototype.socketClosed = function(socket) {
|
||||
debug("Socket closed", socket.socketId);
|
||||
|
||||
if (socket === this.socket && !this.deferredConnection.promise.isPending()) {
|
||||
if (socket === this.socket && this.deferredConnection.promise.isPending()) {
|
||||
debug("Connection error occurred before TLS Handshake");
|
||||
this.deferredConnection.reject(new Error("Unable to connect"));
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче