All goroutines spawned during Server's lifetime are properly finilized and awaited in the call to Server's Shutdown().
Possible Solution
It's not a critical bug, especially after https://github.com/nspcc-dev/neo-go/pull/3661 merge, but we'd better keep the proper behaviour and await all WS-related routines in server shutdown.
Current Behavior
Described in https://github.com/nspcc-dev/neo-go/pull/3661#issuecomment-2457035557. Stacktrace of improperly reused RPC server mutex shows that WS-handler routines are still active after server shutdown:
Expected Behavior
All goroutines spawned during Server's lifetime are properly finilized and awaited in the call to Server's
Shutdown()
.Possible Solution
It's not a critical bug, especially after https://github.com/nspcc-dev/neo-go/pull/3661 merge, but we'd better keep the proper behaviour and await all WS-related routines in server shutdown.