Skip to content

Commit ca6e263

Browse files
committed
fix more states
1 parent e883101 commit ca6e263

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

  • java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session

java-bigtable/google-cloud-bigtable/src/main/java/com/google/cloud/bigtable/data/v2/internal/session/VRpcImpl.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ public void start(ReqT req, VRpcCallContext ctx, VRpcListener<RespT> listener) {
104104
status = cancelStatus;
105105
} else if (state != State.NEW) {
106106
status = Status.INTERNAL.withDescription("VRpc already started in state: " + state);
107-
state = State.CLOSED;
108107
} else if (ctx.getOperationInfo().getDeadline().timeRemaining(TimeUnit.MICROSECONDS)
109108
< TimeUnit.MILLISECONDS.toMicros(1)) {
110109
// Don't send RPCs that don't have any hope of succeeding
@@ -179,7 +178,7 @@ void handleSessionClose(VRpcResult result) {
179178

180179
void handleResponse(VirtualRpcResponse response) {
181180
synchronized (lock) {
182-
if (state != State.STARTED) {
181+
if (state != State.STARTED && state != State.STARTING) {
183182
// This can happen if the call was cancelled just before the response arrived.
184183
// Silently ignore it.
185184
return;

0 commit comments

Comments
 (0)