Skip to content

Commit a098bf6

Browse files
authored
Merge pull request #150 from pd-smith/master
Heartbeat Socket Unhandled Reject Error
2 parents ce8d7d2 + 934e578 commit a098bf6

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/HeartbeatService.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ class Heartbeat {
6363
}
6464
if (timeSinceLastRead > this.heartbeatInterval) {
6565
var req = ClientPingCodec.encodeRequest();
66-
this.client.getInvocationService().invokeOnConnection(conn, req);
66+
this.client.getInvocationService().invokeOnConnection(conn, req)
67+
.catch((error) => {
68+
this.logger.warn('HeartbeatService', error);
69+
});
6770
} else {
6871
if (!conn.heartbeating) {
6972
setImmediate(this.onHeartbeatRestored.bind(this), conn);

test/HeartbeatTest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var HazelcastClient = require('../.').Client;
33
var expect = require('chai').expect;
44
var Config = require('../.').Config;
55

6-
describe('Hearbeat', function() {
6+
describe('Heartbeat', function() {
77
this.timeout(30000);
88

99
var cluster;

0 commit comments

Comments
 (0)