Skip to content

Commit

Permalink
fix: give restart request a timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Julusian committed Sep 29, 2023
1 parent 6dcbdf7 commit 08a1a41
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -702,7 +702,11 @@ export class CasparCGDevice extends DeviceWithState<State, DeviceOptionsCasparCG

const url = `http://${this.initOptions?.launcherHost}:${this.initOptions?.launcherPort}/processes/${this.initOptions?.launcherProcess}/restart`
return got
.post(url)
.post(url, {
timeout: {
request: 5000, // Arbitary, long enough for realistic scenarios
},
})
.then((response) => {
if (response.statusCode === 200) {
return { result: ActionExecutionResultCode.Ok }
Expand Down

0 comments on commit 08a1a41

Please sign in to comment.