Prevent socket leak in ThreadSocketHandler. #4037

pull gmaxwell wants to merge 2 commits into bitcoin:master from gmaxwell:fdleaks changing 2 files +8 −7
  1. gmaxwell commented at 4:32 PM on April 9, 2014: contributor

    When we are over our outbound limit ThreadSocketHandler would try to keep the connection if the peer was addnoded.

    This didn't actually work for two reasons: It didn't actually run the accept code due to mistaken code flow, and because we have a limited number of outbound semaphores it couldn't actually use the connection.

    Instead it leaked the socket, which might have caused issue #4034.

    This patch just takes out the non-functioning white-listing for now.

  2. Prevent socket leak in ThreadSocketHandler.
    When we are over our outbound limit ThreadSocketHandler would try to
     keep the connection if the peer was addnoded.
    
    This didn't actually work for two reasons: It didn't actually run
     the accept code due to mistaken code flow, and because we have a
     limited number of outbound semaphores it couldn't actually use the
     connection.
    
    Instead it leaked the socket, which might have caused issue #4034.
    
    This patch just takes out the non-functioning white-listing for now.
    d20791b0e5
  3. gmaxwell commented at 4:46 PM on April 9, 2014: contributor

    I'd like to bring the intended functionality back too but it requires reworking out the outbound semaphores work and I wanted to get a fix up the user reporting 4034 could test. Since it never worked at all, I didn't think adding the functionality was a top priority.

  4. Correct some proxy related socket leaks. 0bd05b53b1
  5. BitcoinPullTester commented at 12:47 AM on April 10, 2014: none

    Automatic sanity-testing: PASSED, see http://jenkins.bluematt.me/pull-tester/0bd05b53b155bc28b6e5dfd967cafaafb44a439f for binaries and test log. This test script verifies pulls every time they are updated. It, however, dies sometimes and fails to test properly. If you are waiting on a test, please check timestamps to verify that the test.log is moving at http://jenkins.bluematt.me/pull-tester/current/ Contact BlueMatt on freenode if something looks broken.

  6. laanwj commented at 12:08 PM on April 18, 2014: member

    ACK

  7. sipa commented at 9:49 PM on April 18, 2014: member

    ACK

  8. gmaxwell referenced this in commit fe451fe944 on Apr 18, 2014
  9. gmaxwell merged this on Apr 18, 2014
  10. gmaxwell closed this on Apr 18, 2014

  11. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-13 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me