We have noticed too many ports with BOUND state leaking as a result of 429's and 503's from server
to clients running on Windows environments
After debugging a bit, we have uncovered an issue with opamp-go library's httpSender.sendRequestWithRetries method, where response body is not getting closed explicitly in case of 429, 503 before going on for retry -
We tried a fix and it looks encouraging (no port leaks).
Currently observing a fix and will submit a patch in couple of days , after verifying there are no further leaks
This happens in windows as explicit call to resp.Body.Close() is necessary to cleanup tcp sockets. In linux because of connection reuse, old connections will get used up
CC : @pavankrish123 , @kelseyma