1
0
mirror of https://github.com/Ylianst/MeshAgent synced 2025-12-10 13:23:41 +00:00

Backed out change that prevented a disconnect from propagating correctly.

This commit is contained in:
Bryan Roe
2022-08-19 16:25:28 -07:00
parent cf0bf3cd59
commit 8b49af30be

View File

@@ -4653,18 +4653,6 @@ void ILibDuktape_httpStream_webSocket_DecodedEndSink(ILibDuktape_DuplexStream *s
{
ILibDuktape_WebSocket_State *state = (ILibDuktape_WebSocket_State*)user;
ILibDuktape_httpStream_webSocket_WriteWebSocketPacket(state, WEBSOCKET_OPCODE_CLOSE, NULL, 0, ILibWebClient_WebSocket_FragmentFlag_Complete);
//
// We need to call 'end' on the encoded stream, so that it can disconnect
//
if (ILibMemory_CanaryOK(state) && ILibMemory_CanaryOK(state->ctx))
{
duk_push_heapptr(state->ctx, state->ObjectPtr); // [websocket]
duk_get_prop_string(state->ctx, -1, "encoded"); // [websocket][encoded]
duk_prepare_method_call(state->ctx, -1, "end"); // [websocket][encoded][end][this]
duk_pcall_method(state->ctx, 0); duk_pop(state->ctx); // [websocket][encoded]
duk_pop_2(state->ctx); // ...
}
}
void ILibDuktape_httpStream_webSocket_DecodedPauseSink_Chain(void *chain, void *user)
{