rancher / dynamiclistener

Apache License 2.0
17 stars 61 forks source link

Fix net.Conn type assertion #44

Closed cmurphy closed 3 years ago

cmurphy commented 3 years ago

Don't assert that all connections are wrapped, as they won't be if the CloseConnOnCertChange setting is false. Only run the assertion within a conditional for wrapped connections, where it is safe. This prevents a panic from happening when CloseConnOnCertChange is not used.

Fixes an issue found by the rancher/rancher provisioning tests.

cmurphy commented 3 years ago

@brandond @ibuildthecloud could you review this as well?