mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
Merge branch 'subs' into 'develop'
relay: close sub when socket is closed See merge request soapbox-pub/ditto!20
This commit is contained in:
commit
12f6b1f1b7
1 changed files with 4 additions and 0 deletions
|
|
@ -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]) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue