mochiweb style avoidance of gen_tcp:controlling_process
TODO: remove extraneous debug_rlogs
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@666431 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/alterl/src/thrift_binary_protocol.erl b/lib/alterl/src/thrift_binary_protocol.erl
index 633cfba..440da22 100644
--- a/lib/alterl/src/thrift_binary_protocol.erl
+++ b/lib/alterl/src/thrift_binary_protocol.erl
@@ -14,7 +14,8 @@
-export([new/1,
read/2,
write/2,
- flush_transport/1
+ flush_transport/1,
+ close_transport/1
]).
-record(binary_protocol, {transport}).
@@ -30,6 +31,10 @@
flush_transport(#binary_protocol{transport = Transport}) ->
thrift_transport:flush(Transport).
+close_transport(#binary_protocol{transport = Transport}) ->
+ thrift_transport:flush(Transport),
+ thrift_transport:close(Transport).
+
%%%
%%% instance methods
%%%