Commit bbc7c14 1 parent c3aa521 commit bbc7c14 Copy full SHA for bbc7c14
File tree 1 file changed +4
-1
lines changed
universal/src/main/java/com/msopentech/thali/toronionproxy
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -359,7 +359,6 @@ public synchronized void start() throws IOException {
359
359
if (!controlPortFile .getParentFile ().exists ()) controlPortFile .getParentFile ().mkdirs ();
360
360
361
361
File cookieAuthFile = getContext ().getConfig ().getCookieAuthFile ();
362
- cookieAuthFile .delete ();
363
362
if (!cookieAuthFile .getParentFile ().exists ()) cookieAuthFile .getParentFile ().mkdirs ();
364
363
365
364
torProcess = spawnTorProcess ();
@@ -484,6 +483,10 @@ private void waitForControlPortFileCreation(File controlPortFile) throws IOExcep
484
483
* if the timeout for the cookie auth file to be created is exceeded, then an IOException is thrown.
485
484
*/
486
485
private void waitForCookieAuthFileCreation (File cookieAuthFile ) throws IOException {
486
+ if (cookieAuthFile .exists () && cookieAuthFile .length () != 0 ) {
487
+ LOG .info ("Cookie auth file already exists" );
488
+ return ;
489
+ }
487
490
long cookieAuthStartTime = System .currentTimeMillis ();
488
491
LOG .info ("Waiting for cookie auth file" );
489
492
boolean isCreated = cookieAuthFile .exists () || cookieAuthFile .createNewFile ();
You can’t perform that action at this time.
0 commit comments