mirror of
https://github.com/AtlasMediaGroup/TotalFreedomMod.git
synced 2024-11-27 01:05:38 +00:00
NPE on Thread.join() possible fix
This bug is hard to decipher mainly due to the thread being terminated somewhere before the thread.join is called. this may be due to the safeClose method defined with serverSocket, but again, I'm not too sure what's up here. This may also be because something failed to execute in one of the try catch statements, causing the thread to never be initialized in the first place.
This commit is contained in:
parent
fbf2972006
commit
3464a33678
@ -251,7 +251,8 @@ public abstract class NanoHTTPD
|
||||
try
|
||||
{
|
||||
safeClose(myServerSocket);
|
||||
myThread.join();
|
||||
//This should prevent a null pointer :)
|
||||
if (myThread != null) myThread.join();
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user