Change default for keepalive autodisconnect config
By default, automatically disconnect if no response. This is preferable because we can sometimes lose connectivity without receiving a close event from the socket, but it's also possible that the endpoint may not support responses. // FREEBIE
This commit is contained in:
@@ -128,8 +128,8 @@
|
||||
done();
|
||||
});
|
||||
});
|
||||
var resource = new WebSocketResource(new WebSocket('ws://localhost:8081'), {
|
||||
keepalive: { path: '/v1/keepalive', disconnect: true }
|
||||
new WebSocketResource(new WebSocket('ws://localhost:8081'), {
|
||||
keepalive: { path: '/v1/keepalive' }
|
||||
});
|
||||
});
|
||||
|
||||
@@ -145,8 +145,8 @@
|
||||
done();
|
||||
});
|
||||
});
|
||||
var resource = new WebSocketResource(new WebSocket('ws://localhost:8081'), {
|
||||
keepalive: { disconnect: true }
|
||||
new WebSocketResource(new WebSocket('ws://localhost:8081'), {
|
||||
keepalive: true
|
||||
});
|
||||
|
||||
});
|
||||
@@ -158,9 +158,7 @@
|
||||
mockServer.on('connection', function(server) {
|
||||
server.on('close', done);
|
||||
});
|
||||
var resource = new WebSocketResource(socket, {
|
||||
keepalive: { disconnect: true }
|
||||
});
|
||||
new WebSocketResource(socket, { keepalive: true });
|
||||
});
|
||||
|
||||
it('allows resetting the keepalive timer', function(done) {
|
||||
|
Reference in New Issue
Block a user