Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cancel FTP Request Method? #30

Open
bchessin opened this issue Apr 8, 2017 · 3 comments
Open

Cancel FTP Request Method? #30

bchessin opened this issue Apr 8, 2017 · 3 comments

Comments

@bchessin
Copy link

bchessin commented Apr 8, 2017

@PeqNP What would be the easiest way to implement a command to cancel a FTP request? I tried making a stackoverflow question for this: http://stackoverflow.com/questions/43284819/ftpkit-abort-cancel-ftp-operation, however it seems as if this is too specific of an issue to ask there.

What are your suggestions?

@PeqNP
Copy link
Owner

PeqNP commented Apr 8, 2017

If using the ftplib, either FtpClose or FtpQuit. I don't have time to look into it, as I've stopped working on this library. If you happen to get it working I would be more than happy to accept any changes though!

@bchessin
Copy link
Author

bchessin commented Apr 8, 2017

@PeqNP I understand. Just trying to currently wrap my head around the library. So for example, if I am trying to cancel a list request, is a good way of implementing this to keep an ivar of the netbuf that is from the listContentsAtHandle method? And then I would create my own method which would do something like FtpClose(listBuf), or something along those lines? Any guidance is appreciated.

@bchessin
Copy link
Author

bchessin commented Apr 8, 2017

As a follow up (maybe you can immediately see the flaw in my logic). If I do a list request, and in the middle I cancel using FTPClose (like I mentioned in my previous post), then immediately after do a download request, it results in a EXC_BAD_ACCESS crash right after my [client downloadFile ...] request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants