Merge branch '2831-rpc-fail-to-disconnect-an-event-when-the-server-was-closed' into 'master'

Resolve "RPC: Fail to disconnect an event when the server was closed"

Closes #2831

See merge request !3818
10 jobs for master in 111 minutes and 17 seconds (queued for 2 seconds)