Esempio n. 1
0
        /// <summary>
        /// Keep the connection to the server alive by sending the NOOP command
        /// </summary>
        private void SendNoOp()
        {
            if (controller.SyncQueue.Running)
            {
                return;
            }

            try
            {
                Console.WriteLine("NOOP");
                if (FTP)
                {
                    _ftpc.Execute("NOOP");
                }
                else
                {
                    _sftpc.SendKeepAlive();
                }
            }
            catch (Exception ex)
            {
                Common.LogError(ex);
                Reconnect();
            }
        }
Esempio n. 2
0
        /// <summary>
        ///     Keep the connection to the server alive by sending the NOOP command
        /// </summary>
        private void SendNoOp()
        {
            if (_controller.SyncQueue.sync.IsBusy)
            {
                return;
            }

            try
            {
                Console.WriteLine("NOOP");

                lock (ftpcLock)
                {
                    _sftpc.SendKeepAlive();
                }
            }
            catch (Exception ex)
            {
                Common.LogError(ex);
                Reconnect();
            }
        }