Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ycai
simbricks
Commits
6b024ca7
Unverified
Commit
6b024ca7
authored
Sep 26, 2024
by
Jakob Görgen
Browse files
fixed opposing socket creation bug
parent
a3a041bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
experiments/simbricks/orchestration/instantiation/base.py
experiments/simbricks/orchestration/instantiation/base.py
+2
-2
No files found.
experiments/simbricks/orchestration/instantiation/base.py
View file @
6b024ca7
...
@@ -222,11 +222,11 @@ class Instantiation(util_base.IdObj):
...
@@ -222,11 +222,11 @@ class Instantiation(util_base.IdObj):
self
,
socket
:
Socket
,
supported_sock_types
:
set
[
SockType
]
=
set
()
self
,
socket
:
Socket
,
supported_sock_types
:
set
[
SockType
]
=
set
()
)
->
Socket
:
)
->
Socket
:
new_ty
=
(
new_ty
=
(
SockType
.
LISTEN
if
socket
.
_type
==
SockType
.
CONNECT
else
SockType
.
LISTEN
SockType
.
LISTEN
if
socket
.
_type
==
SockType
.
CONNECT
else
SockType
.
CONNECT
)
)
if
new_ty
not
in
supported_sock_types
:
if
new_ty
not
in
supported_sock_types
:
raise
Exception
(
raise
Exception
(
f
"cannot create opposing socket, as required type is not supported: required=
{
new_ty
}
, supported=
{
','
.
join
(
supported_sock_types
)
}
"
f
"cannot create opposing socket, as required type is not supported: required=
{
new_ty
.
name
}
, supported=
{
','
.
join
(
supported_sock_types
)
}
"
)
)
new_path
=
socket
.
_path
new_path
=
socket
.
_path
new_socket
=
Socket
(
path
=
new_path
,
ty
=
new_ty
)
new_socket
=
Socket
(
path
=
new_path
,
ty
=
new_ty
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment