Skip to content

Commit

Permalink
Connection timeout when updating (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
JulianPrieber authored Jan 29, 2024
1 parent 037334d commit a5dac8f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions config/self-update.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,18 @@
'vendor',
],

/*
|--------------------------------------------------------------------------
| Download Timeout
|--------------------------------------------------------------------------
|
| Specifies the duration (in seconds) for how long downloads can take
| until they timeout.
|
*/

'download_timeout' => env('SELF_UPDATER_DOWNLOAD_TIMEOUT', 400),

/*
|--------------------------------------------------------------------------
| Event Logging
Expand Down
1 change: 1 addition & 0 deletions src/Models/Release.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ public function download(): Response
->withOptions([
'sink' => $this->getStoragePath(),
])
->timeout(config('self-update.download_timeout') ?? 400)
->get($this->getDownloadUrl());
}

Expand Down

0 comments on commit a5dac8f

Please sign in to comment.