From 91b47745c27c82076310244327088e4ae9a98d25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Wed, 8 Jan 2025 14:23:33 +0100 Subject: [PATCH] If the job manager is suspended run the job directly Currently it can happen that if the job framework is suspended a download job never starts. This now first check if the manager is suspended and then simply execute the job in-place. --- .../filetransfer/browse/AbstractFileSystemBrowser.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java index 18fdf70f37..2dfe8de688 100644 --- a/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java +++ b/providers/bundles/org.eclipse.ecf.provider.filetransfer/src/org/eclipse/ecf/provider/filetransfer/browse/AbstractFileSystemBrowser.java @@ -21,6 +21,7 @@ import org.eclipse.core.runtime.Assert; import org.eclipse.core.runtime.IProgressMonitor; import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.ecf.core.security.IConnectContext; @@ -147,8 +148,11 @@ public IRemoteFileSystemRequest sendBrowseRequest() { IRemoteFileSystemRequest request = createRemoteFileSystemRequest(); job.setRequest(request); - - job.schedule(); + if (Job.getJobManager().isSuspended()) { + job.run(new NullProgressMonitor()); + } else { + job.schedule(); + } return request; }