示例#1
0
 void Shutdown(string reason)
 {
     if (this.conn.Open && this.IsOpen)
     {
         conn.RemoveFromCache(this.Token);
         if (!sequenceFinished)
         {
             conn.Stop(this);
         }
         SetError(reason);
     }
     else
     {
         SetError(reason);
     }
 }
示例#2
0
 void Shutdown(Exception ex)
 {
     if (this.conn.Open && this.IsOpen)
     {
         conn.RemoveFromCache(this.Token);
         if (!sequenceFinished)
         {
             conn.Stop(this);
         }
         SetError(ex);
     }
     else
     {
         SetError(ex);
     }
 }