mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Add comms.stop to tidy up keepalive timer
This commit is contained in:
@@ -82,6 +82,11 @@ function start() {
|
||||
}, webSocketKeepAliveTime);
|
||||
}
|
||||
|
||||
function stop() {
|
||||
clearInterval(heartbeatTimer);
|
||||
wsServer.close();
|
||||
}
|
||||
|
||||
function publish(topic,data,retain) {
|
||||
if (retain) {
|
||||
retained[topic] = data;
|
||||
@@ -116,5 +121,6 @@ function handleRemoteSubscription(ws,topic) {
|
||||
module.exports = {
|
||||
init:init,
|
||||
start:start,
|
||||
stop:stop,
|
||||
publish:publish,
|
||||
}
|
||||
|
Reference in New Issue
Block a user