Fixes COMETD-486 (Websocket transport goes into infinite loop if opening a socket throws an exception).

Catching the exception and disabling the transport.
Merged branch '2.8.x' into 'master'.