Change code and text in text too
diff --git a/cpp/cpptutorial.md b/cpp/cpptutorial.md
index b13dff1..144b902 100644
--- a/cpp/cpptutorial.md
+++ b/cpp/cpptutorial.md
@@ -220,9 +220,7 @@
builder.RegisterService(&service);
std::unique_ptr<Server> server(builder.BuildAndStart());
std::cout << "Server listening on " << server_address << std::endl;
- while (true) {
- std::this_thread::sleep_for(std::chrono::seconds(5));
- }
+ server->Wait();
}
```
As you can see, we build and start our server using a `ServerBuilder`. To do this, we:
@@ -232,8 +230,7 @@
3. Specify the address and port we want to use to listen for client requests using the builder's `AddPort()` method.
4. Register our service implementation with the builder.
5. Call `BuildAndStart()` on the builder to create and start an RPC server for our service.
-
-_[is there no equivalent of the Stubby4 wait() method, ie do you have to do the while(true) loop to keep the server running?]_
+5. Call `Wait()` on the server to do a blocking wait until process is killed or `Shutdown()` is called.
<a name="client"></a>
## Creating the client