binderhub
binderhub copied to clipboard
eventsource continues launching more containers if left open
If you leave the eventsource open after "ready" it continues launching more
Reproduction steps:
- Visit about:blank
- Open DevTools Console
- Paste:
es = new window.EventSource('https://mybinder.org/build/gh/nteract/vdom/master')
es.onmessage = msg => console.log(msg)
- wait...
- watch all the successive launches
Not a crazy deal for me, I just happened to notice while hitting the event source API directly. My current code does a .close
appropriately. Figured this should probably be cleaned up though.
I think we just got burned by this with the nbinteract repository. @rgbkrk did you figure out a way to work around this from your side of things?
Yeah, we .close()
the event source after we get a freshly baked container. It wasn't an issue at the time, it just smelled like a likely operational problem waiting to happen.
it just smelled like a likely operational problem waiting to happen.
Is this still a problem?