mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
etcdmain: fix blocking m.Server closure
This commit is contained in:
parent
7e3fc182d5
commit
cdb7cfd74b
@ -36,7 +36,7 @@ func serve(l net.Listener, grpcS *grpc.Server, handler http.Handler, readTimeout
|
||||
m := cmux.New(l)
|
||||
grpcl := m.Match(cmux.HTTP2HeaderField("content-type", "application/grpc"))
|
||||
httpl = m.Match(cmux.Any())
|
||||
go plog.Fatal(m.Serve())
|
||||
go func() { plog.Fatal(m.Serve()) }()
|
||||
go plog.Fatal(grpcS.Serve(grpcl))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user