mirror of
https://github.com/ading2210/libcurl.js.git
synced 2025-05-13 14:30:02 -04:00
bugfixes for websocket api
This commit is contained in:
parent
7284487430
commit
3a50060e07
7 changed files with 13 additions and 10 deletions
|
@ -106,7 +106,7 @@ api = {
|
|||
WispConnection: WispConnection,
|
||||
transport: "wisp",
|
||||
|
||||
WebSocket: WebSocket,
|
||||
WebSocket: FakeWebSocket,
|
||||
CurlWebSocket: CurlWebSocket,
|
||||
TLSSocket: TLSSocket,
|
||||
HTTPSession: HTTPSession,
|
||||
|
|
|
@ -132,7 +132,7 @@ class CurlSession {
|
|||
catch (e) {
|
||||
//the readable stream has been closed elsewhere, so cancel the request
|
||||
if (e instanceof TypeError) {
|
||||
finish_callback(-1);
|
||||
end_callback(-1);
|
||||
}
|
||||
else {
|
||||
throw e;
|
||||
|
|
|
@ -107,7 +107,7 @@ class CurlWebSocket extends CurlSession {
|
|||
|
||||
cleanup(error=0) {
|
||||
if (this.http_handle) {
|
||||
this.remove_handle(this.http_handle);
|
||||
this.remove_request(this.http_handle);
|
||||
this.http_handle = null;
|
||||
super.close();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue