From 192e6de6ef333dd7258dc855b2d8616c8389e487 Mon Sep 17 00:00:00 2001 From: Juliusz Chroboczek Date: Mon, 2 Dec 2024 13:52:57 +0100 Subject: [PATCH] Remove onicecandidate callback when closing file transfer. This avoids an unsightly warning when an ICE candidate arrives late. --- static/protocol.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/static/protocol.js b/static/protocol.js index 6461ee2..8bf974f 100644 --- a/static/protocol.js +++ b/static/protocol.js @@ -1744,8 +1744,10 @@ TransferredFile.prototype.close = function() { f.dc.onerror = null; f.dc.onmessage = null; } - if(f.pc) + if(f.pc) { + f.pc.onicecandidate = null; f.pc.close(); + } f.dc = null; f.pc = null; f.data = [];