summaryrefslogtreecommitdiff
path: root/src/main/java/com/orbekk/protobuf
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/orbekk/protobuf')
-rw-r--r--src/main/java/com/orbekk/protobuf/RpcChannel.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main/java/com/orbekk/protobuf/RpcChannel.java b/src/main/java/com/orbekk/protobuf/RpcChannel.java
index 9c52651..594cff8 100644
--- a/src/main/java/com/orbekk/protobuf/RpcChannel.java
+++ b/src/main/java/com/orbekk/protobuf/RpcChannel.java
@@ -80,7 +80,9 @@ public class RpcChannel implements com.google.protobuf.RpcChannel {
@Override
public void run() {
RequestMetadata request = ongoingRequests.remove(id);
- cancelRequest(request, "timeout");
+ if (request != null) {
+ cancelRequest(request, "timeout");
+ }
}
}