mirror of https://github.com/grpc/grpc-java.git
alts: make AltsHandshakerClient#close can be called multiple times
This commit is contained in:
parent
15295c75ae
commit
3f11b27a22
|
|
@ -229,8 +229,14 @@ class AltsHandshakerClient {
|
||||||
return resp.getOutFrames().asReadOnlyByteBuffer();
|
return resp.getOutFrames().asReadOnlyByteBuffer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean closed = false;
|
||||||
|
|
||||||
/** Closes the connection. */
|
/** Closes the connection. */
|
||||||
public void close() {
|
public void close() {
|
||||||
|
if (closed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
closed = true;
|
||||||
handshakerStub.close();
|
handshakerStub.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue