diff --git a/config/self-update.php b/config/self-update.php index b7d348d..e613195 100644 --- a/config/self-update.php +++ b/config/self-update.php @@ -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 diff --git a/src/Models/Release.php b/src/Models/Release.php index a924ca4..8082975 100644 --- a/src/Models/Release.php +++ b/src/Models/Release.php @@ -183,6 +183,7 @@ public function download(): Response ->withOptions([ 'sink' => $this->getStoragePath(), ]) + ->timeout(config('self-update.download_timeout') ?? 400) ->get($this->getDownloadUrl()); }