cfriedt commented on PR #2745:
URL: https://github.com/apache/thrift/pull/2745#issuecomment-1385689183

   > @cfriedt , I guess this is beyond your current scope, but for the sake of 
clean code, would it not be better to bind the `std::shared_ptr` to a custom 
destructor that calls `::THRIFT_CLOSESOCKET` on the socket upon destruction?
   
   Maybe - that sounds a bit more complicated.
   
   > And then again, why is the operating system not doing that in the first 
place?
   
   I suspect that is exactly the issue - devs might expect the OS to close 
dangling FDs for them. However, neither Linux nor macOS do this either (not 
before the process ends). I have not checked what the status is for Windows.
    
   > Please let me know if I'm completely on the wrong track here...
   
   I would guess yea.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to