void SendCmd_End(IAsyncResult ar) { Quit_SO stateObj = (Quit_SO)ar.AsyncState; try { stateObj.UpdateContext(); //---------------------------------------- //finish sending command _cc.EndSendCommand(ar); //---------------------------------------- //Notify DTP that it should handle quit //issue _client.CurrentDTP.Quit(); } catch (Exception e) { stateObj.Exception = e; } finally { //---------------------------------------- //Unlock control connection _cc.Unlock(); stateObj.SetCompleted(); } }