Added null check for input stream on disconnect
This commit is contained in:
parent
ffcc5be0ae
commit
c4a3c5a000
@ -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 {
|
||||||
|
if (inputStream != null) {
|
||||||
inputStream.onCompleted();
|
inputStream.onCompleted();
|
||||||
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("Exception during onCompleted", e);
|
log.error("Exception during onCompleted", e);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user