mirror of
https://github.com/imezx/Warp.git
synced 2026-09-12 19:17:44 +00:00
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:
parent
a27067c8df
commit
256167216e
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue