1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-11 05:43:33 +00:00

Fixed bug where 'close' event registration could get lost during cleanup

This commit is contained in:
Bryan Roe
2021-09-27 08:55:40 -07:00
parent 90f2f570e7
commit bf05a0a187

View File

@@ -3460,7 +3460,6 @@ void ILibDuktape_HttpStream_OnReceive(ILibWebClient_StateObject WebStateObject,
duk_pop(ctx);
}
}
}
else
{
@@ -3861,7 +3860,8 @@ duk_ret_t ILibDuktape_HttpStream_Agent_createConnection(duk_context *ctx)
duk_call_method(ctx, 1); duk_pop_2(ctx); // [Agent][Socket]
ILibDuktape_EventEmitter_AddOnceEx3(ctx, -1, "error", ILibDuktape_HttpStream_Agent_createConnection_eventSink);
ILibDuktape_EventEmitter_AddOnceEx3(ctx, -1, "close", ILibDuktape_HttpStream_Agent_socketEndSink);
ILibDuktape_EventEmitter_AddOn_Infrastructure(ctx, -1, "close", ILibDuktape_HttpStream_Agent_socketEndSink);
return(1);
}