This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 200818 - Abort file download/upload on cancel
Summary: Abort file download/upload on cancel
Status: STARTED
Alias: None
Product: php
Classification: Unclassified
Component: FTP Support (show other bugs)
Version: 7.0.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
: 162179 212537 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-08-10 09:03 UTC by Tomas Mysik
Modified: 2012-05-16 08:28 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Mysik 2011-08-10 09:03:25 UTC
Abort file download/upload on cancel, right now the transfer of the current file is finished and then the transfer itself is cancelled.
Comment 1 Tomas Mysik 2011-08-10 10:32:13 UTC
FTP:
Unfortunately, it seems that there are difficulties using FTPClient.abort() method [1][2]. Also, it is really not clear how the abort() method should be called - if from another thread (as I expected) then there is a problem with synchronization: FTPClient itself is not thread-safe so it means that some custom lock/monitor must be used; but this lock will prevent calling abort() on the FTPClient while it is downloading/uploading file since file upload/download is blocking...

SFTP:
JSCh uses expected way to abort file transfer - implementing SftpProgressMonitor and returning false if the file transfer should be stopped.

Or am I wrong?
[1] http://apache-commons.680414.n4.nabble.com/Net-FTPClient-abort-problem-td739542.html
[2] http://www.tikalk.com/java/forums/apache-ftp-client-abort-transfer
[3] http://wiki.jsch.org/index.php?cancel%20sftp%20file%20transfer
Comment 2 Tomas Mysik 2011-08-11 11:26:23 UTC
I have filed an issue in Commons Net JIRA [1].

[1] https://issues.apache.org/jira/browse/NET-419
Comment 3 Tomas Mysik 2011-09-01 13:50:37 UTC
*** Bug 162179 has been marked as a duplicate of this bug. ***
Comment 4 Tomas Mysik 2012-05-16 08:28:51 UTC
*** Bug 212537 has been marked as a duplicate of this bug. ***