mirror of
https://github.com/Ylianst/MeshAgent
synced 2025-12-15 15:53:55 +00:00
Backed out change that prevented a disconnect from propagating correctly.
This commit is contained in:
@@ -4653,18 +4653,6 @@ void ILibDuktape_httpStream_webSocket_DecodedEndSink(ILibDuktape_DuplexStream *s
|
|||||||
{
|
{
|
||||||
ILibDuktape_WebSocket_State *state = (ILibDuktape_WebSocket_State*)user;
|
ILibDuktape_WebSocket_State *state = (ILibDuktape_WebSocket_State*)user;
|
||||||
ILibDuktape_httpStream_webSocket_WriteWebSocketPacket(state, WEBSOCKET_OPCODE_CLOSE, NULL, 0, ILibWebClient_WebSocket_FragmentFlag_Complete);
|
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)
|
void ILibDuktape_httpStream_webSocket_DecodedPauseSink_Chain(void *chain, void *user)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user