Added null check for input stream on disconnect

This commit is contained in:
Volodymyr Babak 2022-02-09 14:58:32 +02:00
parent ffcc5be0ae
commit c4a3c5a000

View File

@ -162,7 +162,9 @@ public class EdgeGrpcClient implements EdgeRpcClient {
public void disconnect(boolean onError) throws InterruptedException { public void disconnect(boolean onError) throws InterruptedException {
if (!onError) { if (!onError) {
try { try {
inputStream.onCompleted(); if (inputStream != null) {
inputStream.onCompleted();
}
} catch (Exception e) { } catch (Exception e) {
log.error("Exception during onCompleted", e); log.error("Exception during onCompleted", e);
} }