alts: make AltsHandshakerClient#close can be called multiple times

This commit is contained in:
Jihun Cho 2019-09-26 19:43:04 -07:00
parent 15295c75ae
commit 3f11b27a22
1 changed files with 6 additions and 0 deletions

View File

@ -229,8 +229,14 @@ class AltsHandshakerClient {
return resp.getOutFrames().asReadOnlyByteBuffer();
}
private boolean closed = false;
/** Closes the connection. */
public void close() {
if (closed) {
return;
}
closed = true;
handshakerStub.close();
}
}