Skip to content

Commit 3ffc2f7

Browse files
committed
fix error message when source ends before websocket connection is established
1 parent 9dde287 commit 3ffc2f7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
### v0.30.2
4+
* Fixed error message when source ends before websocket connection is opened.
5+
36
### v0.30.1
47
* added recognizeMicrophone.isSupported flag (checks for getUserMedia, assumes other features will be there if that one is)
58

speech-to-text/recognize-stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ RecognizeStream.prototype.finish = function finish() {
379379
if (self.socket && self.socket.readyState === self.socket.OPEN) {
380380
self.sendJSON(closingMessage);
381381
} else {
382-
this.once('connect', function() {
382+
this.once('open', function() {
383383
self.sendJSON(closingMessage);
384384
});
385385
}

0 commit comments

Comments
 (0)