Make writingLock final.

This commit is contained in:
ceikry 2021-07-22 11:08:19 -05:00
parent fd4feb158a
commit a275ea6251

View file

@ -55,7 +55,7 @@ public class IoSession {
/** /**
* The writing lock. * The writing lock.
*/ */
private Lock writingLock = new ReentrantLock(); private final Lock writingLock = new ReentrantLock();
/** /**
* The name hash. * The name hash.
@ -139,7 +139,7 @@ public class IoSession {
try { try {
writingLock.tryLock(1000L, TimeUnit.MILLISECONDS); writingLock.tryLock(1000L, TimeUnit.MILLISECONDS);
} catch (Exception e){ } catch (Exception e){
System.out.println(e); e.printStackTrace();
writingLock.unlock(); writingLock.unlock();
return; return;
} }