Sure. Speaking of which. I'm pretty sure onFailed can be called twice: from the timeout and from transport.start. That will surely cause problems. I would fix this and add tests to verify that the body of onFailed is only run once per transport.

Also. How do you prevent onSuccess from being called after the timeout?