mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-23 00:04:26 +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. */
|
/** Handle client message. */
|
||||||
function handleMsg(msg: ClientMsg) {
|
function handleMsg(msg: ClientMsg) {
|
||||||
switch (msg[0]) {
|
switch (msg[0]) {
|
||||||
|
|||||||
Reference in New Issue
Block a user