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
chenpangpang
ComfyUI
Commits
8e2c99e3
Commit
8e2c99e3
authored
Jan 02, 2024
by
comfyanonymous
Browse files
Fix issue when websocket is deleted when data is being sent.
parent
a47f609f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
server.py
server.py
+4
-2
No files found.
server.py
View file @
8e2c99e3
...
...
@@ -584,7 +584,8 @@ class PromptServer():
message
=
self
.
encode_bytes
(
event
,
data
)
if
sid
is
None
:
for
ws
in
self
.
sockets
.
values
():
sockets
=
list
(
self
.
sockets
.
values
())
for
ws
in
sockets
:
await
send_socket_catch_exception
(
ws
.
send_bytes
,
message
)
elif
sid
in
self
.
sockets
:
await
send_socket_catch_exception
(
self
.
sockets
[
sid
].
send_bytes
,
message
)
...
...
@@ -593,7 +594,8 @@ class PromptServer():
message
=
{
"type"
:
event
,
"data"
:
data
}
if
sid
is
None
:
for
ws
in
self
.
sockets
.
values
():
sockets
=
list
(
self
.
sockets
.
values
())
for
ws
in
sockets
:
await
send_socket_catch_exception
(
ws
.
send_json
,
message
)
elif
sid
in
self
.
sockets
:
await
send_socket_catch_exception
(
self
.
sockets
[
sid
].
send_json
,
message
)
...
...
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