Don't hang forever if websocket transport fails to connect

- Properly handle failures in PerformConnect
- Added functional test to verify behavior

#2168
Handled cancelled tasks for websocket startup

- Fail with a generic error if task is cancelled

#2169
Merge branch 'release' into dev