fix TFramedTransport residual continuation
authorWade Simmons <wade@wades.im>
Fri, 27 Jun 2014 18:55:06 +0000 (11:55 -0700)
committerRoger Meier <roger@apache.org>
Sun, 29 Jun 2014 20:53:23 +0000 (22:53 +0200)
commit35c8b97fbfd277cbb195486e29be17aba714a7b1
treefea40baa2f883a25c22a817f144827ae716aa3b9
parent7878f11024a0d74ee3c0abfbe8fed1a95440f046
fix TFramedTransport residual continuation

There were many bugs in the current TFramedTransport.receiver caused by
merge mistakes and bad patches. Simplify the logic so it is easier to
reason about and prevent future issues.

- THRIFT-2194 Fixed one bug with residual not being set
- THRIFT-2205 Reverted the above fix (by accident) and broke it further
  by including InputBufferUnderrunError in TFramedTransport (which is
  incorrect)

This patch cleans up TFramedTransport.receiver by only have one hold
over buffer instead of two (frame + residual).
lib/nodejs/lib/thrift/transport.js