Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
3.6.2
-
None
Description
I find three issues about stream object use in QuorumCnxManager. They are not bugs but may belong to bad practices.
- Mismatch stream creation in RecvWorker and SendWorker.
DataInputStream in RecvWorker is created bynew DataInputStream(new BufferedInputStream(sock.getInputStream()))
While DataOutputStream in SendWorker is created by
new DataOutputStream(sock.getOutputStream)
- Stream instances are never closed in RecvWorker and SendWorker.
- RecvWorker and SendWorker are initialized before removing old ones.