Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Commit

Permalink
Stream: Do not write before the connection is open
Browse files Browse the repository at this point in the history
  • Loading branch information
orgads committed Jun 4, 2020
1 parent 1f28d76 commit 5b7292a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/StreamingClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export class StreamingClient extends Writable {
this.ws.on("message", this._onmessage.bind(this))
this.ws.on("error", this._onerror.bind(this))
this.ws.on("close", this._onclose.bind(this))
this.cork()
}

/**
Expand All @@ -39,6 +40,7 @@ export class StreamingClient extends Writable {
private _onopen() {
debugLog(`opened connection to aws transcribe`)
this.emit(StreamingClient.EVENTS.OPEN)
this.uncork()
}

/**
Expand Down

0 comments on commit 5b7292a

Please sign in to comment.