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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user