[CDRIVER-35] File descriptor leak Created: 19/Jan/11  Updated: 19/Oct/16  Resolved: 26/Jan/11

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 0.2

Type: Bug Priority: Major - P3
Reporter: nicks Assignee: Kyle Banker
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

All


Issue Links:
Related
is related to CDRIVER-38 Socket timeouts Closed

 Description   

In mongo_connect_helper(), there is a file descriptor leak when connect() fails.
This already fixed in a pull request: https://github.com/workless/mongo-c-driver/commit/3d75594ed16cb6f922bf28674b8597ef515bc357
Please apply this patch (or at least the line that closes the socket).



 Comments   
Comment by Kyle Banker [ 26/Jan/11 ]

Thanks for the report. Going to make the socket timeout a different issue.

Comment by auto [ 26/Jan/11 ]

Author:

{u'login': u'banker', u'name': u'Kyle Banker', u'email': u'kylebanker@gmail.com'}

Message: CDRIVER-35 file descriptor leak (workless)
https://github.com/mongodb/mongo-c-driver/commit/73dcef45317a76a9021af81fb9577395b3665f45

Comment by nicks [ 19/Jan/11 ]

Note that the proposed patch does not handle Windows properly (should use closesocket() on Windows).
See mongo_disconnect().

Thanks.

Generated at Wed Feb 07 21:08:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.