Workaround for engines with broken IRC_ConnectSession: terminate the session if IRC_ConnectSession returns IRC_ERR_STATE, so we can connect again