feat(gateway): log full watch Networking state transitions
Add watch-state N->M log on every djs/voice Networking stateChange (with hasUdp flag) so the stream-watch connection's exact progression is visible: OpeningWs(0)->Identifying(1)->UdpHandshaking(2)->SelectingProtocol(3)-> Ready(4). Pins down where the DAVE flow stalls instead of guessing from the absence of logs. Pairs with debug:true + watch-djs-debug.
This commit is contained in:
@@ -271,9 +271,14 @@ function connectWatch(
|
|||||||
handleUdpMessage(watchKey, netAny, uidProps, msg);
|
handleUdpMessage(watchKey, netAny, uidProps, msg);
|
||||||
};
|
};
|
||||||
|
|
||||||
net.on("stateChange", (newState: unknown) => {
|
net.on("stateChange", (newState, oldState) => {
|
||||||
const s = newState as { code?: number };
|
const s = newState as { code?: number };
|
||||||
const code = s?.code;
|
const code = s?.code;
|
||||||
|
const oldCode = (oldState as { code?: number })?.code;
|
||||||
|
logger.info(
|
||||||
|
{ userId: uid, code, oldCode, hasUdp: !!netAny.state.udp },
|
||||||
|
`watch-state ${oldCode}->${code}`,
|
||||||
|
);
|
||||||
if (code === 4 /* Ready */) {
|
if (code === 4 /* Ready */) {
|
||||||
const udp = netAny.state.udp;
|
const udp = netAny.state.udp;
|
||||||
if (udp) {
|
if (udp) {
|
||||||
|
|||||||
Reference in New Issue
Block a user