added another control endpoint /_ctl/server-conns/{conn_id}/peers

This commit is contained in:
2025-03-23 13:22:53 +09:00
parent 41503373d3
commit 494f11836c
3 changed files with 78 additions and 0 deletions

View File

@ -17,6 +17,7 @@ type ServerPeerConn struct {
Created time.Time
node_in_server *list.Element
node_in_conn *list.Element
stop_chan chan bool
stop_req atomic.Bool
@ -154,6 +155,11 @@ done_without_stop:
spc.node_in_server = nil
spc.route.Cts.S.pts_mtx.Unlock()
spc.route.Cts.pts_mtx.Lock()
spc.route.Cts.pts_list.Remove(spc.node_in_conn)
spc.node_in_conn = nil
spc.route.Cts.pts_mtx.Unlock()
spc.route.Cts.S.bulletin.Enqueue(
&ServerEvent{
Kind: SERVER_EVENT_PEER_DELETED,