We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 91df807 commit c2a9ebdCopy full SHA for c2a9ebd
1 file changed
HttpServer.py
@@ -48,9 +48,12 @@ def SSE(self, expId=None):
48
cherrypy.response.headers['Cache-Control'] = 'no-cache'
49
cherrypy.response.headers['Connection'] = 'keep-alive'
50
# TO DO: stop when all clients are disconnected
51
- if not self.control.running:
52
- self.control.start()
53
- return self.control.nextSample()
+ if expId is not None:
+ if expId in [e['id'] for e in self.experiences]:
+ if not self.control.running:
54
+ self.control.start()
55
+ return self.control.nextSample()
56
+ return 'event: CLOSE\n\n'
57
SSE._cp_config = {'response.stream': True}
58
59
@cherrypy.expose
0 commit comments