Skip to content

Commit

Permalink
Disable http fallback after successful websocket connection (eclipse-…
Browse files Browse the repository at this point in the history
  • Loading branch information
msujew authored Nov 12, 2021
1 parent 3bea909 commit c558358
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ export class WebSocketConnectionProvider extends AbstractConnectionProvider<WebS
this.fireSocketDidClose();
};
socket.onmessage = ({ data }) => {
this.websocketErrorCounter = 0;
this.handleIncomingRawMessage(data);
};
this.socket = socket;
Expand Down Expand Up @@ -224,6 +223,10 @@ export class WebSocketConnectionProvider extends AbstractConnectionProvider<WebS
}

protected fireSocketDidOpen(): void {
// Once a websocket connection has opened, disable the http fallback
if (this.httpFallbackOptions?.allowed) {
this.httpFallbackOptions.allowed = false;
}
this.onSocketDidOpenEmitter.fire(undefined);
}

Expand Down

0 comments on commit c558358

Please sign in to comment.