From fcf54432f710ed178e6ed15a47292c008e1ff419 Mon Sep 17 00:00:00 2001
From: Federico <65908512+coval3nte@users.noreply.github.com>
Date: Fri, 4 Mar 2022 13:25:56 +0100
Subject: [PATCH] network: make request timeout configurable (#7696)

---
 electrum/network.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/electrum/network.py b/electrum/network.py
index 044ea425c..09f5117ec 100644
--- a/electrum/network.py
+++ b/electrum/network.py
@@ -759,6 +759,8 @@ class Network(Logger, NetworkRetryManager[ServerAddr]):
         util.trigger_callback('network_updated')
 
     def get_network_timeout_seconds(self, request_type=NetworkTimeout.Generic) -> int:
+        if self.config.get('network_timeout', None):
+            return int(self.config.get('network_timeout'))
         if self.oneserver and not self.auto_connect:
             return request_type.MOST_RELAXED
         if self.proxy: