Added code for allowing to cancel ws that reconnect