示例#1
0
文件: Channel.cs 项目: cezary12/kokos
        public virtual void close()
        {
            if (connection != null)
            {
                try
                {
                    connection.close();
                }
                catch (Exception)
                {
                    // ignore
                }
                connection = null;

                channelWriter.notifyCancellation();

                if (logCallback != null)
                {
                    logCallback.Log(LogEventArgs.LogLevel.LOW,
                                    "Closed connection to " + target);
                }
            }
        }