auto close websockets on scope destruction
clean up in isabelle proofs