Commit graph

4 commits

Author SHA1 Message Date
Daniel Liu
e7ca47c280
rpc: fix time key collision for logger with json output #24112 (#963)
The "t" key overrides the log message time in JSON output.

Co-authored-by: Roman Mazalov <83914728+gopherxyz@users.noreply.github.com>
Co-authored-by: Felix Lange <fjl@twurst.com>
2025-04-24 18:35:18 +08:00
Daniel Liu
9f504a6243
rpc: tighter shutdown synchronization in client subscription #22597 (#955)
This fixes a rare issue where the client subscription forwarding loop
would attempt send on the subscription's channel after Unsubscribe has
returned, leading to a panic if the subscription channel was already
closed by the user. Example:

    sub, _ := client.Subscribe(..., channel, ...)
    sub.Unsubscribe()
    close(channel)

The race occurred because Unsubscribe called quitWithServer to tell the
forwarding loop to stop sending on sub.channel, but did not wait for the
loop to actually come down. This is fixed by adding an additional channel
to track the shutdown, on which Unsubscribe now waits.

Fixes #22322

Co-authored-by: Felix Lange <fjl@twurst.com>
2025-04-24 18:17:45 +08:00
Daniel Liu
2e34afe400 rpc: swap out timer metrics to histograms (#25044) 2024-12-13 14:00:12 +08:00
Banana-J
39f6e6ee56
upgrade the websocket in xdpos (#349) 2023-11-06 15:37:14 +11:00