Optimally onFailed should never be called twice because we stop the transport entirely but I can potentially see a rogue error triggering the error handler on WS or SSE after the transports have been closed.

As for the onSuccess, this relies on the fact that the transport will never call onSuccess once stopped, again never a bad idea to double check