When an SSL-enabled mongoc_client_t attempts to communicate to a mongod listening on an unsecure socket it leaks one socket per request.
Calling mongoc_client_destroy to clean up the mongoc_client_t does not clean up the sockets. Exiting the applications is the only way to free the sockets.
Steps to reproduce:
- Configure mongod to listen on an unsecure port.
- Configure a mongoc application to communicate with mongod, attempting to use an SSL connection.
- Run the application
- Run 'netstat -b' to observe the increasing number of established socket connections that never close.