mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-19 06:24:21 +01:00
relay: close sub when socket is closed
This commit is contained in:
@@ -34,6 +34,10 @@ function connectStream(socket: WebSocket) {
|
||||
}
|
||||
};
|
||||
|
||||
socket.onclose = () => {
|
||||
Sub.close(socket);
|
||||
};
|
||||
|
||||
/** Handle client message. */
|
||||
function handleMsg(msg: ClientMsg) {
|
||||
switch (msg[0]) {
|
||||
|
||||
Reference in New Issue
Block a user