title: GRPC C++ client finish() blocks forever with Golang server
body: <p>I have a C++ gRPC client and Golang gRPC server. For a bi-directional stream, when the client wants to close the stream, it blocks forever on the call to Finish(). </p>
  
  <p>This only happens if there is <strong>no error</strong>, that is, the server rpc function returns <code>nil</code>. If the server was written in C++, I understand it would have returned <code>Status::Ok</code>. </p>
  
  <p>If the Golang server returns a non-nil error, then the Finish() function returns as expected. The problem occurs only in the case of no error.</p>
  
  <p><strong>Example:</strong></p>
  
  <p><em>.proto</em></p>
  
  <pre><code>service StreamTest {
    rpc Get(stream StreamCommand) returns (stream Result) {}
  }
  message StreamCommand{
    string cmd = 1;
  }
  message Result {
    string res = 1;
  }
  </code></pre>
  
  <p><em>.cpp</em></p>
  
  <pre><code>std::unique_ptr&lt;ClientReaderWriter&lt;StreamCommand, Result&gt;&gt; readerWriter;
  bool Get(Result &amp;res) {
      return readerWriter-&gt;Read(&amp;res);
  }
  
  bool CloseClient() {
      StreamCommand cmd;
      cmd.set_cmd("stop");
      readerWriter-&gt;Write(cmd);
      readerWriter-&gt;WritesDone();
      Status status = readerWriter-&gt;Finish(); // &lt;------ BLOCKING
      return status.ok();
  }
  </code></pre>
  
  <p>I have tested the server with a Golang gRPC client and it works fine. Should the server return something other than a <code>nil</code> error? Should I report this as a bug?</p>
  
  <p>Any help is appreciated! Thanks! </p>