Commit 81a309d5 authored by Robin Obůrka's avatar Robin Obůrka

network: Move socket configuration before bend/connect operation

parent 1ff02d03
......@@ -167,6 +167,7 @@ class Socket:
raise SockConfigError("Unmatched socket type with requested one")
socket = ctx.socket(Socket.SOCKET_TYPE_MAP[self.my_type])
self.configure(socket)
if self.my_direction == "bind":
socket.bind(self.resources[0].get_connection_string())
......@@ -175,8 +176,6 @@ class Socket:
for resource in self.resources:
socket.connect(resource.get_connection_string())
self.configure(socket)
return socket
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment