Don’t save Sone twice, especially not while synchronizing on the Sone.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 20 Apr 2011 17:01:42 +0000 (19:01 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Wed, 20 Apr 2011 17:03:34 +0000 (19:03 +0200)
This causes deadlocks.

src/main/java/net/pterodactylus/sone/core/SoneInserter.java

index 3936975..d24b564 100644 (file)
@@ -229,7 +229,6 @@ public class SoneInserter extends AbstractService {
                                        synchronized (sone) {
                                                if (lastInsertFingerprint.equals(sone.getFingerprint())) {
                                                        logger.log(Level.FINE, "Sone “%s” was not modified further, resetting counter…", new Object[] { sone });
-                                                       core.saveSone(sone);
                                                        lastModificationTime = 0;
                                                        modified = false;
                                                }