relay: close sub when socket is closed
This commit is contained in:
parent
f9de6932ac
commit
00c531bbff
|
@ -34,6 +34,10 @@ function connectStream(socket: WebSocket) {
|
|||
}
|
||||
};
|
||||
|
||||
socket.onclose = () => {
|
||||
Sub.close(socket);
|
||||
};
|
||||
|
||||
/** Handle client message. */
|
||||
function handleMsg(msg: ClientMsg) {
|
||||
switch (msg[0]) {
|
||||
|
|
Loading…
Reference in New Issue