title: GRPC Server getting Client cancellation
body: <p>i have created a microservice for a webcam-stream with grpc. the streaming works fine but the cancellation of the stream works only on client side.</p>
  
  <p>if the client calls CancellableContext.cancel, the streaming of video stops but the server is still streaming a video with the cam. if the cancellation is called the server throws a Transport faild Exception.</p>
  
  <p>could this exception can be catched for stopping streaming or other operations on the server-side?</p>
  
  <pre><code>ClientCall&lt;KameraStreamRequest, KameraStreamResponse&gt; call = (ClientCall) imageStreamBlockingStub.getChannel().newCall(ImageStreamServiceGrpc.METHOD_IMAGE_DATA_STREAM, imageStreamBlockingStub.getCallOptions());
  call.sendMessage(KameraStreamRequest.newBuilder().setStreamState(StreamState.STOP).build());
  </code></pre>
  
  <p>The streaming is started with a simple request which has an enum with State.START. if i call the code above to change the state to STOP i become an exception:</p>
  
  <pre><code>Exception in thread "main" java.lang.IllegalStateException: Not started
  at com.google.common.base.Preconditions.checkState(Preconditions.java:174)
  at io.grpc.internal.ClientCallImpl.sendMessage(ClientCallImpl.java:388)
  at org.cpm42.grpcservice.ImageStreamClient.cancelStream(ImageStreamClient.java:70)
  at org.cpm42.main.StreamClientMainClass.main(StreamClientMainClass.java:21)
  </code></pre>
  
  <p>i have read that this could be a bug.</p>
  
  <p>is it possible to get Sessions or Connections or something else on server-side?</p>
  
  <p>thanks </p>