Open scottslewis opened 1 year ago
This should be fixed so that FileReader fails gracefully if false is returned from either pause() or resume().
I have take a look at FileReader
usage of IFileTransferPausable.pause()
at laest that looks safe for me:
org.eclipse.equinox.internal.p2.transport.ecf.FileReader.handleTransferEvent(IFileTransferEvent)
and thats the only location where it is set to trueSo it seems that the pause()
somehow make it to the ECF and P2 but the resume then fails.
Currrently, the p2 FileReader class
https://github.com/eclipse-equinox/p2/blob/master/bundles/org.eclipse.equinox.p2.transport.ecf/src/org/eclipse/equinox/internal/p2/transport/ecf/FileReader.java
Uses the ECF IFileTransferPausable.pause() and resume() method to pause and resume file download.
The IFileTransferPausable interface is here
https://github.com/eclipse/ecf/blob/master/framework/bundles/org.eclipse.ecf.filetransfer/src/org/eclipse/ecf/filetransfer/IFileTransferPausable.java
Both the pause() and resume() methods return a boolean which indicates whether the pause/resume as successful or not.
Currently, the p2 ecf transport does not examine the return values from pause or resume and this can lead to p2 hanging waiting for an event that will never occur as in this issue:
https://github.com/eclipse-equinox/p2/pull/206#issuecomment-1627598314
This should be fixed so that FileReader fails gracefully if false is returned from either pause() or resume().
AFAICT, the p2 FileReader class is the only one that uses IFileTransferPausable.pause() or resume().