mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-14 20:01:47 +00:00
fix(music-together): fix infinite loop
This commit is contained in:
@ -224,19 +224,18 @@ export class Connection {
|
|||||||
>,
|
>,
|
||||||
) => {
|
) => {
|
||||||
if (conn.open) {
|
if (conn.open) {
|
||||||
conn.close({
|
conn.close();
|
||||||
flush: true,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
delete this.connections[conn.connectionId];
|
delete this.connections[conn.connectionId];
|
||||||
this.connectionListeners.forEach((listener) => listener(conn));
|
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
if (err.type === 'connection-closed') {
|
if (err.type === 'connection-closed') {
|
||||||
this.connectionListeners.forEach((listener) => listener());
|
this.connectionListeners.forEach((listener) => listener());
|
||||||
}
|
}
|
||||||
reject(err);
|
reject(err);
|
||||||
|
} else {
|
||||||
|
this.connectionListeners.forEach((listener) => listener(conn));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
conn.on('error', onClose);
|
conn.on('error', onClose);
|
||||||
|
|||||||
Reference in New Issue
Block a user