correct channel and payload in Server.Invoke

Server.Invoke sent {reqId, args} on channel 0, but channel 0 on the
   client is reserved for resolving pending client-initiated invokes.
   The client never has a pending invoke matching a server-generated
   reqId, so the payload was silently dropped and the registered
   Client.Connect listener never ran - Server.Invoke always timed out.

   Channel 1 is the "execute registered listener and reply" channel.
   The client's remote == 1 handler expects {remoteId, reqId, args},
   so this also adds the missing remoteId so the client can find the
   correct listener in eventListeners.
This commit is contained in:
Oreomial 2026-09-05 20:26:53 +00:00 committed by GitHub
parent a27067c8df
commit 256167216e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -181,8 +181,8 @@ Server.Invoke = function(remoteName: string, player: Player, timeout: number?, .
queueEvent[player] = {} :: any
end
table.insert(queueEvent[player], {
0,
{ reqId :: any, { ... } :: any } :: any,
1,
{ Identifier.get_id(remoteName), reqId, { ... } } :: any,
})
return coroutine.yield()
end