HADOOP-16868. ipc.Server readAndProcess threw NullPointerException. Contributed by Tsz-wo Sze.
(cherry picked from commitcb3f3cca01
) (cherry picked from commitd411a849e1
)
This commit is contained in:
parent
a6124cd2b8
commit
b28347d282
|
@ -1789,7 +1789,7 @@ public abstract class Server {
|
||||||
|
|
||||||
private SocketChannel channel;
|
private SocketChannel channel;
|
||||||
private ByteBuffer data;
|
private ByteBuffer data;
|
||||||
private ByteBuffer dataLengthBuffer;
|
private final ByteBuffer dataLengthBuffer;
|
||||||
private LinkedList<RpcCall> responseQueue;
|
private LinkedList<RpcCall> responseQueue;
|
||||||
// number of outstanding rpcs
|
// number of outstanding rpcs
|
||||||
private AtomicInteger rpcCount = new AtomicInteger();
|
private AtomicInteger rpcCount = new AtomicInteger();
|
||||||
|
@ -2833,7 +2833,6 @@ public abstract class Server {
|
||||||
private synchronized void close() {
|
private synchronized void close() {
|
||||||
disposeSasl();
|
disposeSasl();
|
||||||
data = null;
|
data = null;
|
||||||
dataLengthBuffer = null;
|
|
||||||
if (!channel.isOpen())
|
if (!channel.isOpen())
|
||||||
return;
|
return;
|
||||||
try {socket.shutdownOutput();} catch(Exception e) {
|
try {socket.shutdownOutput();} catch(Exception e) {
|
||||||
|
|
Loading…
Reference in New Issue