We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
example code:
package main import ( "fmt" "net" "os" "os/signal" "syscall" "time" "github.com/soheilhy/cmux" "google.golang.org/grpc" ) func main() { lis, err := net.Listen("tcp", ":8080") if err != nil { panic(err) } mux := cmux.New(lis) grpcL := mux.Match(cmux.HTTP2HeaderField("content-type", "application/grpc")) _ = grpcL s := grpc.NewServer() // xxx.RegisterXXXServiceServer(s, XXXIMPL) go func() { // FIXME: using muxed grpcL here can not graceful stop err = s.Serve(lis) fmt.Println(err) }() fmt.Println("wait for sig") c := make(chan os.Signal, 1) signal.Notify(c, []os.Signal{syscall.SIGTERM, syscall.SIGQUIT, syscall.SIGINT}...) <-c // FIXME: hangs on when start server with grpcL s.GracefulStop() fmt.Println("stopped") time.Sleep(time.Second * 1) }
The text was updated successfully, but these errors were encountered:
See #76
Sorry, something went wrong.
No branches or pull requests
example code:
The text was updated successfully, but these errors were encountered: