mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-13 14:30:02 -04:00
update curl and fix memory error with websockets
This commit is contained in:
parent
8b53625743
commit
5c3c591a41
4 changed files with 19 additions and 13 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue