Skip to content
This repository was archived by the owner on Nov 28, 2018. It is now read-only.

Commit e3e5f8d

Browse files
committed
Add keep alive to socket
This one prevents closing sockets by external service. It happens that after 2 minutes socket is closed by remote, and there is no event connected to it. I expected to get timeout event, but it is never happened in my case.
1 parent 98f04fb commit e3e5f8d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/stomp.js

+2
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ function _setupListeners(stomp) {
137137

138138
var socket = stomp.socket;
139139

140+
socket.setKeepAlive(true);
141+
140142
socket.on('drain', function(data) {
141143
log.debug('draining');
142144
});

0 commit comments

Comments
 (0)