Skip to content

Commit 33fda51

Browse files
some cleanup
1 parent 862cf1e commit 33fda51

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

server/job_stream.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ func (ls *LivepeerServer) runStream(gatewayJob *gatewayJob) {
207207
// or if passing `nil` as a CancelCause
208208
err = nil
209209
}
210-
if !ls.LivepeerNode.ExternalCapabilities.StreamExists(streamID) {
210+
if !params.inputStreamExists() {
211211
clog.Info(ctx, "No stream exists, skipping orchestrator swap")
212212
break
213213
}
@@ -272,7 +272,7 @@ func (ls *LivepeerServer) monitorStream(streamId string) {
272272
select {
273273
case <-stream.StreamCtx.Done():
274274
clog.Infof(ctx, "Stream %s stopped, ending monitoring", streamId)
275-
ls.LivepeerNode.ExternalCapabilities.RemoveStream(streamId)
275+
delete(ls.LivepeerNode.LivePipelines, streamId)
276276
return
277277
case <-pmtTicker.C:
278278
if !params.inputStreamExists() {
@@ -291,6 +291,7 @@ func (ls *LivepeerServer) monitorStream(streamId string) {
291291
}
292292

293293
// fetch new JobToken with each payment
294+
// update the session for the LivePipeline with new token
294295
newToken, err := getToken(ctx, 3*time.Second, token.ServiceAddr, stream.Pipeline, jobSender.Addr, jobSender.Sig)
295296
if err != nil {
296297
clog.Errorf(ctx, "Error getting new token for %s: %v", token.ServiceAddr, err)

0 commit comments

Comments
 (0)