mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-07-14 07:57:26 +02:00
Add files via upload
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package handler
|
||||
|
||||
import "context"
|
||||
|
||||
// detachedAgentContext lets a long-running Agent survive an SSE disconnect
|
||||
// while retaining immutable request values such as the authenticated Principal.
|
||||
func detachedAgentContext(parent context.Context) context.Context {
|
||||
if parent == nil {
|
||||
parent = context.Background()
|
||||
}
|
||||
return context.WithoutCancel(parent)
|
||||
}
|
||||
Reference in New Issue
Block a user