Cancel the onSubThreadEnded callback,because _ws may be deleted in the onClose callback.

Cancel the onSubThreadEnded callback,because _ws may be deleted in the onClose callback.