Actually I take that back. You could use grpc server as a http.Handler and 
run create your own http2 server. In such a case when you call Shutdown() 
the grpc server's Stop() or GracefulStop() aren't called because the grpc 
server is acting only as a handler. Thus, the Shutdown function on the 
http2 server should do what it does.

On Monday, January 9, 2017 at 7:55:23 PM UTC-8, Francis Chuang wrote:
>
> grpc-go has a ServeHTTP() 
> <https://godoc.org/google.golang.org/grpc#Server.ServeHTTP> method which 
> allows the grpc server to be a handler for a net/http server. In go 1.8, 
> the net/http server will have a Shutdown() 
> <https://tip.golang.org/pkg/net/http/#Server.Shutdown>method to 
> gracefully shutdown. If I use the ServeHTTP() method as a handler, does 
> calling net/http server's Shutdown() method cleanly shuts down everything 
> and replicate grpc-go server's GracefulShutdown() method?
>
> If not, how do I achieve graceful shutdown correctly when using the 
> ServeHTTP() method?
>

-- 
You received this message because you are subscribed to the Google Groups 
"grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/grpc-io.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/grpc-io/9cb8dc3d-620d-449b-9b66-c33ea458aac2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to