Skip to content

Commit 87406ac

Browse files
authored
Merge pull request #1 from iotum/expose-error-events
Expose the Underlying Socket Error, So the Application Knows the Reason for the Disconnect/Reconnect
2 parents feb64e8 + ba8db6a commit 87406ac

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/client.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ module.exports = class Client extends EventEmitter {
142142

143143
_onSocketError(error) {
144144
// ignore, the close handler takes care of retry
145+
this.emit('error', error); // Expose the error object so the application can identify the reason for the disconnects
145146
}
146147

147148
_onParserError(error) {

0 commit comments

Comments
 (0)