Skip to content

Commit b1dab37

Browse files
committed
Merge pull request Lawouach#64 from jodal/dont-broadcast-to-terminated-sockets
Don't broadcast messages to terminated WebSockets
2 parents 7406ff5 + 78d2a88 commit b1dab37

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ws4py/server/cherrypyserver.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,8 @@ def broadcast(self, message, binary=False):
346346
"""
347347
for ws_handler in self.pool:
348348
try:
349-
ws_handler.send(message, binary)
349+
if not ws_handler.terminated:
350+
ws_handler.send(message, binary)
350351
except:
351352
cherrypy.log(traceback=True)
352353

0 commit comments

Comments
 (0)