safety and hopefully fix crashing bug with GPU mode.

This commit is contained in:
KingKDot
2026-05-07 19:41:47 -05:00
parent 3b51d7f5b6
commit 1a0dc05222
10 changed files with 101 additions and 15 deletions
@@ -77,6 +77,11 @@ func (m *Manager) Load(ctx context.Context, manifest PluginManifest, binary []by
Payload: payloadVal,
}
go func() {
defer func() {
if r := recover(); r != nil {
log.Printf("[panic] plugin event send: %v", r)
}
}()
sendCtx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
if err := wire.WriteMsg(sendCtx, m.writer, msg); err != nil {