-
Notifications
You must be signed in to change notification settings - Fork 668
change deleteDirectoryTask to a List #321
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -76,7 +72,7 @@ | |||
private final boolean proxyInjectionMode; | |||
private final boolean forceProxyChain; | |||
private boolean fakeCertsGenerated; | |||
private DeleteDirectoryTask deleteDirectoryTask; | |||
private List<DeleteDirectoryTask> deleteDirectoryTasks = new ArrayList<DeleteDirectoryTask>(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrap this in Collections.synchronizedList() and make this final.
This looks good to me, and I'm surprised we didn't have this before. I made a few comments to make it thread safe. |
Thanks for the comment. I update the fix as your commented out. Let me know if I need to make more changes. |
Now I am seeing this exception: java.io.FileNotFoundException: /tmp/seleniumSslSupportwww.google-analytics.com4561906671811516371/keymap.ser (No such file or directory) |
Okay, I'll hold off on merging this until that error is resolved. |
I changed back to beta2, I see this exception in the log: java.lang.RuntimeException: Can't start SslRelay: server is not started (perhaps it was just shut down?) Do you know what's possible cause for it? |
Are you saying you see this issue when you apply the change in this PR to beta-2? |
No, I see the above error when I am running beta2 without my changes. |
If it's not related to this PR, you should probably open a separate issue for it. What are the results of your tests with this PR build? |
This looks good to me, so I'm inclined to merge it before releasing beta 3. @chemicwepn - if you do see any issues with this change, please feel free to submit another PR. |
change deleteDirectoryTask to a List
I am aware if the jvm exists, it will remove all created temp folders. However, I need to keep the jvm running as long as possible in production, which eventually cause the temp folder to fill up with tons of temp folders created by the proxy.
Fix: changed DeleteDirectoryTask deleteDirectoryTask to List deleteDirectoryTasks in SeleniumProxyHandler class, so that when user need to clean up the temp folders but keep the jvm running they can just call proxy.cleanSslCertificates() method.