Edit: replaced 'close underlying transport' with 'flush buffers'
The C++ TBufferedTransports (such as TBufferedTransport) do not flush their buffers on delete.
The workaround is to manually flush the TBufferedTransport before deleting it. If the TBufferedTransport owned the last instance of the underlying transport, it will be deleted and close itself.
This may be worth fixing - at the moment, substituting a buffered TSocket for an unbuffered one changes the behaviour on delete.
Data may be buffered then lost when the TBufferedTransport is deleted.
This is undesirable - they should behave identically except for the buffering.