Added new features/fix to restart websocket (thread) on disconnection (for windows)