Restarting C++ server after shutdown?

29 views
Skip to first unread message

Antoine Pitrou

unread,
Feb 27, 2019, 7:55:05 AM2/27/19
to grp...@googlegroups.com

Hello,

If I call the Shutdown() method on a grpc::Server instance, is it
possible to start serving again without creating a new Server?
It seems that the Wait() method will return immediately if I call it
again.

Use case: I have a signal handler that will shutdown the server.
Then, when Wait() returns, I run any Python signal handlers and would
like to restart if they didn't raise an exception.

Regards

Antoine.


yas...@google.com

unread,
Feb 27, 2019, 1:58:07 PM2/27/19
to grpc.io
I suggest not shutting down the server too early if there is a possibility of using it in the future.

Antoine Pitrou

unread,
Feb 27, 2019, 3:12:15 PM2/27/19
to grp...@googlegroups.com

But calling Shutdown() is the only way to stop the server, right?

Regards

Antoine.
Reply all
Reply to author
Forward
0 new messages