Skip to content

Commit

Permalink
Socket disconnect test
Browse files Browse the repository at this point in the history
  • Loading branch information
chughts committed Mar 5, 2018
1 parent b76256e commit 6feddd0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"word-count": "^0.2.2",
"is-docx": "^0.0.3",
"stream-to-array" : "^2.3.0",
"ws" : "^4.0.0"
"ws" : "^4.1.0"
},
"repository": {
"type": "git",
Expand Down
6 changes: 5 additions & 1 deletion services/speech_to_text/v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,8 @@ module.exports = function (RED) {
} else if (d && d.state && 'listening' === d.state) {
socketListening = true;
// Added for verbose testing
node.send(newMsg);
// SC - Web Sockect Test
//node.send(newMsg);
//resolve();
} else {
node.send(newMsg);
Expand All @@ -424,6 +425,9 @@ module.exports = function (RED) {
websocket = null;
socketListening = false;
// console.log('STT Socket disconnected');
if (!muteMode) {
payloadutils.reportError(node,newMsg,'STT Socket Connection closed');
}
setTimeout(connectIfNeeded, 1000);
});

Expand Down

0 comments on commit 6feddd0

Please sign in to comment.