enhanced func (s *Server) FindServerConnByIdStr(conn_id string) to treat non-numeric conn_id as a connection token

This commit is contained in:
2025-02-20 23:12:16 +09:00
parent d9aaa0a0ab
commit 429bb6cd63
2 changed files with 9 additions and 4 deletions

View File

@ -575,6 +575,7 @@ func (ctl *server_ctl_notices) ServeHTTP(w http.ResponseWriter, req *http.Reques
goto oops
}
// TODO: what if this loop takes too long? in that case, lock is held for long. think about how to handle this.
s.cts_mtx.Lock()
for _, cts = range s.cts_map {
cts.pss.Send(MakeConnNoticePacket(noti.Text))