Sha256: 6b2042efb33a1732e25673f7ac03844cf7597c7d038a6c32fdbf1b7e0c84492d

Contents?: true

Size: 717 Bytes

Versions: 4

Compression:

Stored size: 717 Bytes

Contents

# Monkey patch for Thrift::FramedTransport typically found in:
# /usr/local/lib/ruby/site_ruby/1.8/thrift/transport/framed_transport.rb
#
# Rev 765279 (current recommended Thrift rev for Hypertable) does not
# reset buffer state when the connection is reopened.  This patch will
# be submitted to Thrift once it has been tested for a few weeks in 
# production.

module Thrift
  class FramedTransport < BaseTransport
    def initialize(transport, read=true, write=true)
      reset_state
      @transport = transport
      @read = read
      @write = write
    end

    def reset_state
      @rbuf = ''
      @wbuf = ''
      @index = 0
    end

    def open
      reset_state
      @transport.open
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
hyper_record-0.9.5 lib/hypertable/thrift_transport_monkey_patch.rb
hyper_record-0.9.4 lib/hypertable/thrift_transport_monkey_patch.rb
hyper_record-0.9.3 lib/hypertable/thrift_transport_monkey_patch.rb
hyper_record-0.2.8 lib/hypertable/thrift_transport_monkey_patch.rb