Comparing version 2.3.0 to 2.3.1
@@ -20,3 +20,5 @@ (function() { | ||
this.connections = []; | ||
this.server = Net.createServer(); | ||
this.server = Net.createServer({ | ||
allowHalfOpen: true | ||
}); | ||
this.server.on('error', (function(_this) { | ||
@@ -23,0 +25,0 @@ return function(err) { |
@@ -64,3 +64,3 @@ (function() { | ||
Service.prototype.end = function() { | ||
var localId; | ||
var err, localId; | ||
if (this.transport) { | ||
@@ -74,3 +74,7 @@ this.transport.end(); | ||
localId = this.opened ? this.localId : 0; | ||
this.socket.write(Packet.assemble(Packet.A_CLSE, localId, this.remoteId, null)); | ||
try { | ||
this.socket.write(Packet.assemble(Packet.A_CLSE, localId, this.remoteId, null)); | ||
} catch (_error) { | ||
err = _error; | ||
} | ||
this.transport = null; | ||
@@ -77,0 +81,0 @@ this.ended = true; |
@@ -85,4 +85,8 @@ (function() { | ||
this.ended = false; | ||
this.reader = new PacketReader(this.socket); | ||
this.reader.on('packet', this._handle.bind(this)); | ||
this.reader = new PacketReader(this.socket).on('packet', this._handle.bind(this)).on('error', (function(_this) { | ||
return function(err) { | ||
debug("PacketReader error: " + err.message); | ||
return _this.end(); | ||
}; | ||
})(this)).on('end', this.end.bind(this)); | ||
this.version = 1; | ||
@@ -103,4 +107,4 @@ this.maxPayload = 4096; | ||
} | ||
this.services.end(); | ||
this.socket.end(); | ||
this.services.end(); | ||
this.ended = true; | ||
@@ -107,0 +111,0 @@ this.emit('end'); |
{ | ||
"name": "adbkit", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "A pure Node.js client for the Android Debug Bridge.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
225232
4424