id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 12545,stream_socket_service forcibly takes responsibility for closing the native_handle,Adrien CLERC ,chris_kohlhoff,"When using the `basic_stream_socket` [https://github.com/boostorg/asio/blob/36eef63a9cf8ae609716d76ccb3906ff9769d53a/include/boost/asio/basic_stream_socket.hpp#L130 constructor with a native_handle_type], it seems that the service will call `close()` on it [https://github.com/boostorg/asio/blob/36eef63a9cf8ae609716d76ccb3906ff9769d53a/include/boost/asio/detail/impl/reactive_socket_service_base.ipp#L91 upon destruction]. I have no expectation on this behavior, but this should be stressed in the documentation. Using this constructor (or the `assign()` method) is very handy when dealing with third-parties, but those very same third-parties can have the same policy of auto-closing. This will lead to double closing, which is the best way for data corruption in a process that constantly opens and closes files. I will go for a call to `dup()` before using the `ip::tcp::socket` for now.",Bugs,new,To Be Determined,asio,Boost 1.61.0,Problem,,native_handle close,