Skip to content
Snippets Groups Projects
Commit a2075202 authored by Alexander Schlemmer's avatar Alexander Schlemmer Committed by Daniel
Browse files

FIX: bug that caused a remote end closed without response

Cherry-picked from 1bca2f60.
parent 82e0d6e9
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,11 @@ class _DefaultCaosDBServerConnection(CaosDBServerConnection):
if headers is None:
headers = {}
try:
self._http_con = StreamingHTTPSConnection(
host=self.setup_fields["host"],
timeout=self.setup_fields["timeout"],
context=self.setup_fields["context"],
socket_proxy=self.setup_fields["socket_proxy"])
self._http_con.request(method=method, url=self._base_path + path,
headers=headers, body=body)
except SocketError as socket_err:
......@@ -117,10 +122,16 @@ class _DefaultCaosDBServerConnection(CaosDBServerConnection):
"No connection url specified. Please "
"do so via caosdb.configure_connection(...) or in a config "
"file.")
self._http_con = StreamingHTTPSConnection(
host=host,
timeout=int(config.get("timeout")),
context=context)
socket_proxy = None
if "socket_proxy" in config:
socket_proxy = config["socket_proxy"]
self.setup_fields = {
"host": host,
"timeout": int(config.get("timeout")),
"context": context,
"socket_proxy": socket_proxy}
def _make_conf(*conf):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment