Skip to content

Commit

Permalink
fix: verify connectivity on axon socket #41
Browse files Browse the repository at this point in the history
  • Loading branch information
Unitech authored and vmarchaud committed May 15, 2018
1 parent 0581397 commit b632712
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/transporters/AxonTransport.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ module.exports = class AxonTransport extends Transporter {
this._socket.data('*', function (data) {
// Call _onMessage() with event and data as params
// Apply self to use this as transport
return self._onMessage.apply(self, [ this, data ]) // eslint-disable-line
return self._onMessage.apply(self, [ this, data ]) // eslint-disable-line
})

// Connect to interaction/reverse server
Expand Down Expand Up @@ -120,7 +120,7 @@ module.exports = class AxonTransport extends Transporter {
*/
isConnected () {
return this._socket && this._socket.connected && !this._socket.retry.waiting &&
this._axon && this._axon.sock.connected && this._axon.sock.socks[0].bufferSize < 290000
this._axon && this._axon.sock.connected && this._axon.sock.socks && this._axon.sock.socks[0] && this._axon.sock.socks[0].bufferSize < 290000
}

/**
Expand Down

0 comments on commit b632712

Please sign in to comment.