Clear pending messages when removing connection

pull/5280/head
Lennart Altenhof 2025-09-23 11:48:54 +02:00
parent 9201e6bd9e
commit 27179c788f
No known key found for this signature in database
GPG Key ID: 363155D20AB43BE2
1 changed files with 2 additions and 0 deletions

View File

@ -314,6 +314,8 @@ function addActiveConnection(connection) {
runtimeAPI.comms.addConnection({client: connection});
}
function removeActiveConnection(connection) {
// Clear pending messages.
connection.stack = []
for (var i=0;i<activeConnections.length;i++) {
if (activeConnections[i] === connection) {
activeConnections.splice(i,1);