示例#1
0
        private static void TimeoutCallback(object state, bool setted)
        {
            RpcHttpClientTransaction trans = null;

            try {
                if (setted)                   // Timeout
                {
                    trans = (RpcHttpClientTransaction)state;
                    var resp = RpcResponseHeader.CreateError(RpcErrorCode.TransactionTimeout, null);
                    trans._callback(resp);
                }
            } catch (Exception ex) {
                SystemLog.Error(LogEventID.RpcFailed, ex, "TimeoutCallback");
            } finally {
                if (trans != null)
                {
                    trans.Dispose();
                }
            }
        }