Custom Timeout to the server request made by Client #136
-
App is installed in client machine and from there the application is making the request to check for updates or download the updates, what is happening in my case is, when the server was down and in that time the application got stopped or not responsive when making the request. So i got the idea of why not we customize the timeout from the client side. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Python-tuf defines the Tufup defines a subclass of Your best option would probably be to monkey-patch Do note that this may have security implications, as discussed in several python-tuf issues. To name a few: |
Beta Was this translation helpful? Give feedback.
Hi @ritishbhardwaj
Python-tuf defines the
tuf.ngclient.RequestsFetcher
, which has asocket_timeout
argument.Tufup defines a subclass of
RequestsFetcher
, calledAuthRequestsFetcher
, but we do not expose this in the tufup client. This was intentional, to limit the complexity for tufup users.Your best option would probably be to monkey-patch
AuthRequestsFetcher
(orRequestsFetcher
) to override the defaultsocket_timeout
value.Do note that this may have security implications, as di…