_hyperscript
_hyperscript copied to clipboard
eventsource close() does not work on a failing connection.
Discovered by misspelling my endpoint.
The eventsource keeps attempting to reconnect every second, and calling me.close() in the on error
handler does not stop the attempts to reconnect. In fact, it seems to make it worse, as it then immediately attempts to reconnect, rather than waiting the normal second.
If the eventsource can connect, thereafter the close() method works as expected and stops the connection without attempting to reconnect.
Thanks for posting this. Hyperscript clearly should not do this. I'll try to see what's happening and make a fix.