mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-20 23:41:23 +02:00
fix: add nil guard before entrypoint retrieval; move config from types/
This commit is contained in:
@@ -82,7 +82,11 @@ func (r *StreamRoute) Start(parent task.Parent) gperr.Error {
|
||||
r.l.Info().Msg("stream closed")
|
||||
})
|
||||
|
||||
entrypoint.FromCtx(parent.Context()).AddRoute(r)
|
||||
ep := entrypoint.FromCtx(parent.Context())
|
||||
if ep == nil {
|
||||
return gperr.New("entrypoint not initialized")
|
||||
}
|
||||
ep.AddRoute(r)
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user