ws close on err