Redis Router graceful stop (#116)
* prestop and hasparticipants in interface * add prestop function to existing routers * fakerouter prestop * update protocol version * read lock * redis router graceful stop * test fix * force stop
This commit is contained in:
@@ -258,6 +258,11 @@ func (r *RedisRouter) Start() error {
|
||||
}
|
||||
}
|
||||
|
||||
func (r *RedisRouter) PreStop() {
|
||||
r.currentNode.State = livekit.NodeState_SHUTTING_DOWN
|
||||
r.RegisterNode()
|
||||
}
|
||||
|
||||
func (r *RedisRouter) Stop() {
|
||||
if !r.isStarted.TrySet(false) {
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user