mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-16 07:44:31 +08:00
Some tests in multiplexer passed connections to Mux before registering to handle a specific type of connection (TLS, Postgres, etc). When the Mux Serve function handles the connection before the type of connection is registered to be handled, it will close the connection. Race condition: 1. create Mux 2. send new connection to Mux listener 3. register DB listener and receive conn Fixed race: 1. create Mux 2. register DB listener 3. send new connection to Mux listener 4. receive conn from DB listener