cancel ws connection on close/error