Skip to content

Commit 862cf1e

Browse files
get new token for stop request
1 parent 34e53b9 commit 862cf1e

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
@@ -100,6 +100,7 @@ func (ls *LivepeerServer) StopStream() http.Handler {
100100
stopJob.sign() //no changes to make, sign job
101101

102102
token, err := sessionToToken(params.liveParams.sess)
103+
newToken, err := getToken(ctx, 3*time.Second, token.ServiceAddr, stopJob.Job.Req.Capability, stopJob.Job.Req.Sender, stopJob.Job.Req.Sig)
103104
if err != nil {
104105
clog.Errorf(ctx, "Error converting session to token: %s", err)
105106
http.Error(w, err.Error(), http.StatusBadRequest)
@@ -114,7 +115,7 @@ func (ls *LivepeerServer) StopStream() http.Handler {
114115
}
115116
defer r.Body.Close()
116117

117-
resp, code, err := ls.sendJobToOrch(ctx, r, stopJob.Job.Req, stopJob.SignedJobReq, token, "/ai/stream/stop", body)
118+
resp, code, err := ls.sendJobToOrch(ctx, r, stopJob.Job.Req, stopJob.SignedJobReq, *newToken, "/ai/stream/stop", body)
118119
if err != nil {
119120
clog.Errorf(ctx, "Error sending job to orchestrator: %s", err)
120121
http.Error(w, err.Error(), code)
@@ -899,7 +900,7 @@ func (ls *LivepeerServer) UpdateStream() http.Handler {
899900
controlPub := stream.ControlPub
900901

901902
if controlPub == nil {
902-
clog.Info(ctx, "No orchestrator available, caching params", "stream", stream, "params", params)
903+
clog.Info(ctx, "No orchestrator available, caching params", "stream", streamId, "params", params)
903904
return
904905
}
905906

0 commit comments

Comments
 (0)