File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ export class Listener implements IListener {
100100 */
101101 public open ( ) : Promise < void > {
102102 return new Promise ( ( resolve , reject ) => {
103- if ( this . webSocket === undefined || this . webSocket . readyState === WebSocket . CLOSED ) {
103+ if ( this . webSocket === undefined || this . webSocket . readyState === this . webSocket . CLOSED ) {
104104 if ( this . websocketInjected ) {
105105 this . webSocket = new this . websocketInjected ( this . url ) ;
106106 } else {
@@ -197,7 +197,7 @@ export class Listener implements IListener {
197197 */
198198 public isOpen ( ) : boolean {
199199 if ( this . webSocket ) {
200- return this . webSocket . readyState === WebSocket . OPEN ;
200+ return this . webSocket . readyState === this . webSocket . OPEN ;
201201 }
202202 return false ;
203203 }
@@ -207,7 +207,10 @@ export class Listener implements IListener {
207207 * @returns void
208208 */
209209 public close ( ) : void {
210- if ( this . webSocket && ( this . webSocket . readyState === WebSocket . OPEN || this . webSocket . readyState === WebSocket . CONNECTING ) ) {
210+ if (
211+ this . webSocket &&
212+ ( this . webSocket . readyState === this . webSocket . OPEN || this . webSocket . readyState === this . webSocket . CONNECTING )
213+ ) {
211214 this . webSocket . close ( ) ;
212215 }
213216 }
You can’t perform that action at this time.
0 commit comments