Model: opus-5-5
This commit is contained in:
@@ -188,8 +188,9 @@ func (s *Streamer) RegisterRawHandler(handler RawMessageHandler) {
|
||||
// Start begins streaming BGP updates from the RIS Live API in a background goroutine.
|
||||
// It starts worker goroutines for each registered handler and manages automatic
|
||||
// reconnection with exponential backoff on connection failures.
|
||||
// Returns an error if the streamer is already running.
|
||||
func (s *Streamer) Start() error {
|
||||
// Returns an error if the streamer is already running. It streams until Stop:
|
||||
// the end of ctx does not stop it.
|
||||
func (s *Streamer) Start(ctx context.Context) error {
|
||||
s.mu.Lock()
|
||||
defer s.mu.Unlock()
|
||||
|
||||
@@ -197,7 +198,7 @@ func (s *Streamer) Start() error {
|
||||
return errAlreadyRunning
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
ctx, cancel := context.WithCancel(context.WithoutCancel(ctx))
|
||||
s.cancel = cancel
|
||||
s.running = true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user