Skip to content

Commit 1a5a243

Browse files
thewhalekingibraheem-abe
authored andcommitted
Handle SSL Error on Connection (#2384)
1 parent bc10981 commit 1a5a243

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bittensor/core/subtensor.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import argparse
2424
import copy
2525
import socket
26+
import ssl
2627
from typing import Union, Optional, TypedDict, Any
2728

2829
import numpy as np
@@ -231,7 +232,7 @@ def _get_substrate(self):
231232
except (AttributeError, TypeError, socket.error, OSError) as e:
232233
logging.warning(f"Error setting timeout: {e}")
233234

234-
except ConnectionRefusedError as error:
235+
except (ConnectionRefusedError, ssl.SSLError) as error:
235236
logging.error(
236237
f"Could not connect to {self.network} network with {self.chain_endpoint} chain endpoint.",
237238
)

0 commit comments

Comments
 (0)