[ 
https://issues.apache.org/jira/browse/THRIFT-749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12852481#action_12852481
 ] 

Adam Simpkins commented on THRIFT-749:
--------------------------------------

If you have a TBufferedTransport that wraps a TSocket, the TSocket should still 
close itself when it gets destroyed.

The TBufferedTransport contains a shared_ptr to the underlying transport.  If 
the underlying transport is not destroyed when the TBufferedTransport is 
destroyed, this must mean another location in your code is still holding on to 
a shared_ptr for the underlying transport.  In this situation, it makes sense 
not to close it, that other location in the code may still be using it.

> C++ TBufferedTransports do not close the underlying connection on delete
> ------------------------------------------------------------------------
>
>                 Key: THRIFT-749
>                 URL: https://issues.apache.org/jira/browse/THRIFT-749
>             Project: Thrift
>          Issue Type: Bug
>          Components: Library (C++)
>    Affects Versions: 0.2, 0.3
>         Environment: Cygwin 1.7.1 on Windows XP SP3, Thrift 0.2.0 & r760184 & 
> Trunk 
>            Reporter: Tim Wilson-Brown
>            Priority: Trivial
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> The C++ TBufferedTransports (such as TBufferedTransport) do not close the 
> underlying connection on delete.
> The workaround is to manually close the TBufferedTransport (which does close 
> the underlying connection) before deleting it.
> This may be worth fixing - at the moment, substituting a buffered TSocket for 
> an unbuffered one changes the behaviour on delete.
> This is undesirable  - they should behave identically except for the 
> buffering.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to