Skip to content

Commit d111a74

Browse files
committed
feat: Report errors for every failed attempt in M2SSLTransport initAsClient
1 parent f19f9dc commit d111a74

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/DIRAC/Core/DISET/private/Transports/M2SSLTransport.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def initAsClient(self):
110110
if self.serverMode():
111111
raise RuntimeError("SSLTransport is in server mode.")
112112

113-
error = None
113+
errors = []
114114
host, port = self.stServerAddress
115115

116116
# The following piece of code was inspired by the python socket documentation
@@ -151,12 +151,12 @@ def initAsClient(self):
151151
# They should be propagated upwards and caught by the BaseClient
152152
# not to enter the retry loop
153153
except OSError as e:
154-
error = f"{e}:{repr(e)}"
154+
errors.append(f"{socketAddress} {e}:{repr(e)}")
155155

156156
if self.oSocket is not None:
157157
self.close()
158158

159-
return S_ERROR(error)
159+
return S_ERROR("; ".join(errors))
160160

161161
def initAsServer(self):
162162
"""Prepare this server socket for use."""

0 commit comments

Comments
 (0)