Set an explicit timeout for ImageProxyAction's HttpClient
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 26 Nov 2020 11:29:23 +0000 (12:29 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 26 Nov 2020 11:29:23 +0000 (12:29 +0100)
wcfsetup/install/files/lib/action/ImageProxyAction.class.php

index ccf779d3db8d577d2feb9b7469fa8bba7cf276db..a6d37519e6bdd882c5a98f6b57e2b96cd00a2587 100644 (file)
@@ -94,7 +94,9 @@ class ImageProxyAction extends AbstractAction {
                                        
                                        // download image
                                        try {
-                                               $client = HttpFactory::getDefaultClient();
+                                               $client = HttpFactory::makeClient([
+                                                       'timeout' => 10,
+                                               ]);
                                                $request = new Request('GET', $url, [
                                                        'via' => '1.1 wsc',
                                                        'accept' => 'image/*',