Parcourir la source

frontend: WebSocketSession.closed() more check

wangweimin il y a 5 ans
Parent
commit
e53747cac2

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
pywebio/html/js/pywebio.min.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
pywebio/html/js/pywebio.min.js.map


+ 1 - 1
webiojs/src/session.ts

@@ -96,7 +96,7 @@ export class WebSocketSession implements Session {
     }
 
     closed(): boolean {
-        return this._closed;
+        return this._closed || this.ws.readyState===WebSocket.CLOSED || this.ws.readyState===WebSocket.CLOSING;
     }
 }
 

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff