fix issue with remote desktop inputs and move ping to async to prevent any issues with clients disconnecting from it.

This commit is contained in:
KingKDot
2026-04-06 18:04:45 -05:00
parent 9f876b5828
commit feb1c66526
4 changed files with 28 additions and 16 deletions
+5 -4
View File
@@ -15,10 +15,11 @@ func HandlePing(ctx context.Context, env *runtime.Env, envelope map[string]inter
ts = time.Now().UnixMilli()
}
pong := wire.Pong{Type: "pong", TS: ts}
if err := wire.WriteMsg(ctx, env.Conn, pong); err != nil {
log.Printf("ping: failed to send pong: %v", err)
return err
}
go func() {
if err := wire.WriteMsg(ctx, env.Conn, pong); err != nil {
log.Printf("ping: failed to send pong: %v", err)
}
}()
return nil
}