update curl and fix memory error with websockets

This commit is contained in:
ading2210 2025-01-22 16:10:44 -05:00
parent 8b53625743
commit 5c3c591a41
4 changed files with 19 additions and 13 deletions

View file

@ -111,14 +111,12 @@ class CurlWebSocket extends CurlSession {
}
cleanup(error=0) {
if (this.http_handle) {
this.remove_request(this.http_handle);
this.http_handle = null;
super.close();
}
else return;
clearInterval(this.recv_loop);
if (!this.connected)
return;
if (this.recv_loop)
clearInterval(this.recv_loop);
super.close();
this.connected = false;
if (error) {