-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
type_featureNew feature or requestNew feature or request
Description
Is your feature request related to a problem? Please describe
Implement a graceful shutdown for rmb-sdk-go/peer so all relay connection goroutines and the processing loop exit cleanly without races, leaks, or panics.
- Avoid closing shared channels (which may lead to race/panic).
- Proactively send WebSocket close handshake to reduce protocol errors (observed in the relay-side logs).
- Close Substrate connection
Motivation
- goleak report goroutines like:
-net.(*sysDialer).dialParallel
(from websocket dial)gethrpc.(*Client).dispatch
(substrate client reader)
- Some practice in the code noticed that it risked race conditions due to unsafe channel closes and could leave goroutines running
- Websocket “connection reset without closing handshake” errors on the relay-side logs on shutdown of the peer.
Describe the solution you'd like
NA
Metadata
Metadata
Assignees
Labels
type_featureNew feature or requestNew feature or request
Type
Projects
Status
Pending Review