I have a server that receives traffic from a standard tcp listener, but doesn't receive traffic from a cmux.Any() connection derived from the same listener. I have a small, reproducible case:
This works (i.e. can receive traffic):
listener, err := net.Listen("tcp", fmt.Sprintf(":%d", port))
if err != nil {
logger.Fatal("Could not listen on port.")
}
go grpcServer.Start(listener) // Works - connections are received and processed.
This doesn't work (i.e. connection hangs when making a request):
listener, err := net.Listen("tcp", fmt.Sprintf(":%d", port))
if err != nil {
logger.Fatal("Could not listen on port.")
}
m := cmux.New(listener)
grpcListener := m.Match(cmux.Any())
go grpcServer.Start(grpcListener) // Doesn't work - connections hang.
I have a server that receives traffic from a standard tcp listener, but doesn't receive traffic from a cmux.Any() connection derived from the same listener. I have a small, reproducible case:
This works (i.e. can receive traffic):
This doesn't work (i.e. connection hangs when making a request):