Very very (very) old bug bug that blocked uploads/downloads when slots were running out
This commit is contained in:
tonikelope 2023-01-02 17:10:38 +01:00
parent cea6c7b7d0
commit 2120f621c4
6 changed files with 47 additions and 32 deletions

View File

@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.tonikelope</groupId> <groupId>com.tonikelope</groupId>
<artifactId>MegaBasterd</artifactId> <artifactId>MegaBasterd</artifactId>
<version>7.59</version> <version>7.60</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -496,7 +496,7 @@ public class Download implements Transference, Runnable, SecureSingleThreadNotif
@Override @Override
public void checkSlotsAndWorkers() { public void checkSlotsAndWorkers() {
if (!isExit()) { if (!isExit() && !this._finalizing) {
synchronized (_workers_lock) { synchronized (_workers_lock) {

View File

@ -67,7 +67,7 @@ import javax.swing.UIManager;
*/ */
public final class MainPanel { public final class MainPanel {
public static final String VERSION = "7.59"; public static final String VERSION = "7.60";
public static final boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY public static final boolean FORCE_SMART_PROXY = false; //TRUE FOR DEBUGING SMART PROXY
public static final int THROTTLE_SLICE_SIZE = 16 * 1024; public static final int THROTTLE_SLICE_SIZE = 16 * 1024;
public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024; public static final int DEFAULT_BYTE_BUFFER_SIZE = 16 * 1024;

View File

@ -289,6 +289,8 @@ public final class MainPanelView extends javax.swing.JFrame {
String file_path = f.getParentFile().getAbsolutePath().replace(base_path, ""); String file_path = f.getParentFile().getAbsolutePath().replace(base_path, "");
try {
LOG.log(Level.INFO, "{0} FILE_PATH -> {1}", new Object[]{Thread.currentThread().getName(), file_path}); LOG.log(Level.INFO, "{0} FILE_PATH -> {1}", new Object[]{Thread.currentThread().getName(), file_path});
String[] dirs = file_path.split("\\" + File.separator); String[] dirs = file_path.split("\\" + File.separator);
@ -341,6 +343,19 @@ public final class MainPanelView extends javax.swing.JFrame {
} }
} catch (Exception ex) {
if (!getMain_panel().getUpload_manager().getTransference_preprocess_global_queue().isEmpty()) {
getMain_panel().getUpload_manager().getTransference_preprocess_global_queue().remove(f);
getMain_panel().getUpload_manager().secureNotify();
}
LOG.log(SEVERE, null, ex);
}
} }
} catch (Exception ex) { } catch (Exception ex) {

View File

@ -570,7 +570,7 @@ public class Upload implements Transference, Runnable, SecureSingleThreadNotifia
@Override @Override
public void checkSlotsAndWorkers() { public void checkSlotsAndWorkers() {
if (!isExit()) { if (!isExit() && !this._finalizing) {
synchronized (_workers_lock) { synchronized (_workers_lock) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 179 KiB

After

Width:  |  Height:  |  Size: 181 KiB