projects
/
jSite.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add random mumber for different jSite instances.
[jSite.git]
/
src
/
de
/
todesbaum
/
jsite
/
application
/
ProjectInserter.java
diff --git
a/src/de/todesbaum/jsite/application/ProjectInserter.java
b/src/de/todesbaum/jsite/application/ProjectInserter.java
index
3d2457b
..
a761951
100644
(file)
--- a/
src/de/todesbaum/jsite/application/ProjectInserter.java
+++ b/
src/de/todesbaum/jsite/application/ProjectInserter.java
@@
-54,6
+54,9
@@
import de.todesbaum.util.io.StreamCopier;
*/
public class ProjectInserter implements FileScannerListener, Runnable {
*/
public class ProjectInserter implements FileScannerListener, Runnable {
+ /** Random number for FCP instances. */
+ private static final int random = (int) (Math.random() * Integer.MAX_VALUE);
+
/** Counter for FCP connection identifier. */
private static int counter = 0;
/** Counter for FCP connection identifier. */
private static int counter = 0;
@@
-366,7
+369,7
@@
public class ProjectInserter implements FileScannerListener, Runnable {
List<String> files = fileScanner.getFiles();
/* create connection to node */
List<String> files = fileScanner.getFiles();
/* create connection to node */
- Connection connection = freenetInterface.getConnection("project-insert-" + counter++);
+ Connection connection = freenetInterface.getConnection("project-insert-" +
random +
counter++);
boolean connected = false;
Throwable cause = null;
try {
boolean connected = false;
Throwable cause = null;
try {