Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
fix: WebAdapter only sends message if websocket is OPEN
Browse files Browse the repository at this point in the history
  • Loading branch information
Naktibalda authored May 14, 2019
1 parent 079d82c commit ed22aae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/botbuilder-adapter-web/src/web_adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export class WebAdapter extends BotAdapter {
if (channel === 'websocket') {
// If this turn originated with a websocket message, respond via websocket
var ws = clients[activity.recipient.id];
if (ws) {
if (ws && ws.readyState === 1) {
try {
ws.send(JSON.stringify(message));
} catch (err) {
Expand Down

0 comments on commit ed22aae

Please sign in to comment.