mos-connection
Advanced tools
Comparing version 0.0.1-nightly-develop-20200302-140636-1acec89.0 to 0.0.1-nightly-feat-lessLogging-20200911-142900-7fcc351.0
@@ -402,2 +402,3 @@ "use strict"; | ||
// dispatch error!!!!! | ||
this.emit('error', `Socket event error: ${error.message}`); | ||
if (this._debug) | ||
@@ -411,2 +412,3 @@ console.log(`Socket event error: ${error.message}`); | ||
if (hadError) { | ||
this.emit('warning', 'Scoket closed with error'); | ||
if (this._debug) | ||
@@ -421,2 +423,3 @@ console.log('Socket closed with error'); | ||
if (this._shouldBeConnected === true) { | ||
this.emit('warning', 'Socket shouod reconnect'); | ||
if (this._debug) | ||
@@ -423,0 +426,0 @@ console.log('Socket should reconnect'); |
@@ -52,2 +52,3 @@ "use strict"; | ||
// Connect client | ||
this.emit('info', `Connect client ${i} on ${this._clients[i].clientDescription} on host ${this._host}`); | ||
if (this._debug) | ||
@@ -220,2 +221,3 @@ console.log(`Connect client ${i} on ${this._clients[i].clientDescription} on host ${this._host}`); | ||
client.heartbeatConnected = false; | ||
this.emit('error', `Heartbeat error on ${this._clients[key].clientDescription}: ${e.toString()}`); | ||
if (this._debug) | ||
@@ -222,0 +224,0 @@ console.log(`Heartbeat on ${this._clients[key].clientDescription}: ${e.toString()}`); |
@@ -72,2 +72,5 @@ "use strict"; | ||
}); | ||
primary.on('info', (str) => { | ||
this.emit('info', 'primary: ' + str); | ||
}); | ||
primary.createClient(MosConnection.nextSocketID, MosConnection.CONNECTION_PORT_LOWER, 'lower', true); | ||
@@ -89,2 +92,5 @@ primary.createClient(MosConnection.nextSocketID, MosConnection.CONNECTION_PORT_UPPER, 'upper', true); | ||
}); | ||
secondary.on('info', (str) => { | ||
this.emit('info', 'secondary: ' + str); | ||
}); | ||
secondary.createClient(MosConnection.nextSocketID, MosConnection.CONNECTION_PORT_LOWER, 'lower', true); | ||
@@ -409,2 +415,3 @@ secondary.createClient(MosConnection.nextSocketID, MosConnection.CONNECTION_PORT_UPPER, 'upper', true); | ||
client.socket.on('error', (e) => { | ||
this.emit('error', `Socket had error (${socketID}, ${client.socket.remoteAddress}, ${client.portDescription}): ${e}`); | ||
if (this._debug) | ||
@@ -411,0 +418,0 @@ console.log(`Socket had error (${socketID}, ${client.socket.remoteAddress}, ${client.portDescription}): ${e}`); |
{ | ||
"name": "mos-connection", | ||
"version": "0.0.1-nightly-develop-20200302-140636-1acec89.0", | ||
"version": "0.0.1-nightly-feat-lessLogging-20200911-142900-7fcc351.0", | ||
"description": "MOS compliant TCP/IP Socket connection.", | ||
@@ -90,3 +90,3 @@ "main": "dist/index.js", | ||
"@types/node": "^12.12.3", | ||
"codecov": "^3.6.1", | ||
"codecov": "^3.6.5", | ||
"gh-pages": "^2.0.1", | ||
@@ -93,0 +93,0 @@ "jest": "^24.9.0", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
379378
5157