This commit is contained in:
cui 2026-06-18 21:54:36 -07:00 committed by GitHub
commit 5034fce4f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -388,7 +388,7 @@ func (s *Service) readLoop(conn *connWrapper) {
// If the network packet is a system ping, respond to it directly
var ping string
if err := json.Unmarshal(blob, &ping); err == nil && strings.HasPrefix(ping, "primus::ping::") {
if err := conn.WriteJSON(strings.ReplaceAll(ping, "ping", "pong")); err != nil {
if err := conn.WriteJSON(strings.Replace(ping, "primus::ping::", "primus::pong::", 1)); err != nil {
log.Warn("Failed to respond to system ping message", "err", err)
return
}