HADOOP-16868. ipc.Server readAndProcess threw NullPointerException. Contributed by Tsz-wo Sze.

(cherry picked from commit cb3f3cca01)
(cherry picked from commit d411a849e1)
(cherry picked from commit b28347d282)
This commit is contained in:
Wei-Chiu Chuang 2020-02-18 21:53:08 -08:00
parent 38e97c2061
commit f87efc1211
1 changed files with 1 additions and 2 deletions

View File

@ -1777,7 +1777,7 @@ public abstract class Server {
private SocketChannel channel;
private ByteBuffer data;
private ByteBuffer dataLengthBuffer;
private final ByteBuffer dataLengthBuffer;
private LinkedList<RpcCall> responseQueue;
// number of outstanding rpcs
private AtomicInteger rpcCount = new AtomicInteger();
@ -2744,7 +2744,6 @@ public abstract class Server {
private synchronized void close() {
disposeSasl();
data = null;
dataLengthBuffer = null;
if (!channel.isOpen())
return;
try {socket.shutdownOutput();} catch(Exception e) {