Beispiel #1
0
        /// <summary>
        ///     Attemps to log the user out asynchronously, sends the QUIT command and terminates the command socket.
        /// </summary>
        public async Task LogOutAsync()
        {
            await IgnoreStaleData();

            if (!IsConnected)
            {
                return;
            }

            Logger?.LogTrace("[FtpClient] Logging out");
            await ControlStream.SendCommandAsync(FtpCommand.QUIT);

            ControlStream.Disconnect();
            IsAuthenticated = false;
        }
Beispiel #2
0
        /// <summary>
        ///     Attemps to log the user out asynchronously, sends the QUIT command and terminates the command socket.
        /// </summary>
        public async Task LogOutAsync()
        {
            await IgnoreStaleData();

            if (!IsConnected)
            {
                return;
            }

            LoggerHelper.Trace("[FtpClient] Logging out");
            await ControlStream.SendCommandAsync(FtpCommand.QUIT);

            ControlStream.Disconnect();
            if (LocalEndPoint != null)
            {
                LocalEndPoint = null;
            }
            IsAuthenticated = false;
        }