livedesk 0.1.123 → 0.1.124
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/hub/src/remote-hub.js +13 -13
- package/package.json +1 -1
package/hub/src/remote-hub.js
CHANGED
|
@@ -3605,6 +3605,19 @@ export function createRemoteHub(options = {}) {
|
|
|
3605
3605
|
: incoming;
|
|
3606
3606
|
|
|
3607
3607
|
while (!socket.destroyed) {
|
|
3608
|
+
if (state.pendingBinaryFrame) {
|
|
3609
|
+
const { header, byteLength } = state.pendingBinaryFrame;
|
|
3610
|
+
if (state.buffer.length < byteLength) {
|
|
3611
|
+
return;
|
|
3612
|
+
}
|
|
3613
|
+
|
|
3614
|
+
const framePayload = state.buffer.subarray(0, byteLength);
|
|
3615
|
+
state.buffer = state.buffer.subarray(byteLength);
|
|
3616
|
+
state.pendingBinaryFrame = null;
|
|
3617
|
+
enqueueAgentBinaryFrame(socket, state, header, framePayload);
|
|
3618
|
+
continue;
|
|
3619
|
+
}
|
|
3620
|
+
|
|
3608
3621
|
if (state.authenticated && state.frameOnly && state.buffer.length > 0) {
|
|
3609
3622
|
if (state.buffer.length < TCP_BINARY_FRAME_MAGIC.length && hasTcpBinaryFrameMagicPrefix(state.buffer)) {
|
|
3610
3623
|
return;
|
|
@@ -3628,19 +3641,6 @@ export function createRemoteHub(options = {}) {
|
|
|
3628
3641
|
}
|
|
3629
3642
|
}
|
|
3630
3643
|
|
|
3631
|
-
if (state.pendingBinaryFrame) {
|
|
3632
|
-
const { header, byteLength } = state.pendingBinaryFrame;
|
|
3633
|
-
if (state.buffer.length < byteLength) {
|
|
3634
|
-
return;
|
|
3635
|
-
}
|
|
3636
|
-
|
|
3637
|
-
const framePayload = state.buffer.subarray(0, byteLength);
|
|
3638
|
-
state.buffer = state.buffer.subarray(byteLength);
|
|
3639
|
-
state.pendingBinaryFrame = null;
|
|
3640
|
-
enqueueAgentBinaryFrame(socket, state, header, framePayload);
|
|
3641
|
-
continue;
|
|
3642
|
-
}
|
|
3643
|
-
|
|
3644
3644
|
const newlineIndex = state.buffer.indexOf(0x0a);
|
|
3645
3645
|
if (newlineIndex < 0) {
|
|
3646
3646
|
if (state.buffer.length > MAX_LINE_CHARS) {
|