Skip to content

Commit a5dac8f

Browse files
Connection timeout when updating (#504)
1 parent 037334d commit a5dac8f

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

config/self-update.php

+12
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,18 @@
9797
'vendor',
9898
],
9999

100+
/*
101+
|--------------------------------------------------------------------------
102+
| Download Timeout
103+
|--------------------------------------------------------------------------
104+
|
105+
| Specifies the duration (in seconds) for how long downloads can take
106+
| until they timeout.
107+
|
108+
*/
109+
110+
'download_timeout' => env('SELF_UPDATER_DOWNLOAD_TIMEOUT', 400),
111+
100112
/*
101113
|--------------------------------------------------------------------------
102114
| Event Logging

src/Models/Release.php

+1
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ public function download(): Response
183183
->withOptions([
184184
'sink' => $this->getStoragePath(),
185185
])
186+
->timeout(config('self-update.download_timeout') ?? 400)
186187
->get($this->getDownloadUrl());
187188
}
188189

0 commit comments

Comments
 (0)