HDFS-10820. Reuse closeResponder to reset the response variable in DataStreamer#run. Contributed by Yiqun Lin.
This commit is contained in:
parent
74f4bae455
commit
0690f0969e
|
@ -536,14 +536,8 @@ class DataStreamer extends Daemon {
|
||||||
TraceScope scope = null;
|
TraceScope scope = null;
|
||||||
while (!streamerClosed && dfsClient.clientRunning) {
|
while (!streamerClosed && dfsClient.clientRunning) {
|
||||||
// if the Responder encountered an error, shutdown Responder
|
// if the Responder encountered an error, shutdown Responder
|
||||||
if (errorState.hasError() && response != null) {
|
if (errorState.hasError()) {
|
||||||
try {
|
closeResponder();
|
||||||
response.close();
|
|
||||||
response.join();
|
|
||||||
response = null;
|
|
||||||
} catch (InterruptedException e) {
|
|
||||||
LOG.warn("Caught exception", e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DFSPacket one;
|
DFSPacket one;
|
||||||
|
|
Loading…
Reference in New Issue