From c665fed11821f24dc99f71f77f297d404316cb24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kjetil=20=C3=98rbekk?= Date: Wed, 25 Apr 2012 11:18:51 +0200 Subject: Fix timeout bug. --- src/main/java/com/orbekk/protobuf/RpcChannel.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/com/orbekk/protobuf') 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"); + } } } -- cgit v1.2.3