Skip to content

StartKeepAlive not working. #3

@WATYF

Description

@WATYF

Turning off KeepAlive and then turning it back on again doesn't work because StartKeepAlive doesn't flip the keepAlive bool back to true, so when KeepAliveThreadFunc starts running again, it never issues the NoopCmd because it first checks to see if keepAlive is true. You have to change StartKeepAlive to:

    public void StartKeepAlive()
    {
        CheckConnection();

        if (keepAliveThread != null)
            throw new FTPException("KeepAlive already started");
        keepAlive = true;
        keepAliveThread = new Thread(new ThreadStart(KeepAliveThreadFunc));
        keepAliveThread.Start();
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions