Skip to content
This repository has been archived by the owner on May 27, 2022. It is now read-only.

Commit

Permalink
Using the correct encode/decode messages now
Browse files Browse the repository at this point in the history
  • Loading branch information
Annette Bieniusa committed Sep 25, 2018
1 parent 9a530ba commit 1721795
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/antidotec_pb_socket.erl
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ handle_call(stop, _From, State) ->
%% @todo handle timeout
handle_info({_Proto, Sock, Data}, State=#state{active = (Active = #request{})}) ->
<<MsgCode:8, MsgData/binary>> = Data,
Response = antidote_pb_codec:decode(MsgCode, MsgData),
Response = antidote_pb_codec:decode_msg(MsgCode, MsgData),
cancel_req_timer(Active#request.tref),
_ = send_caller(Response, Active),
NewState = State#state{active = undefined},
Expand Down Expand Up @@ -220,7 +220,7 @@ send_request(Request0, State) when State#state.active =:= undefined ->

%% Unencoded Request (the normal PB client path)
encode_request_message(#request{msg=Msg}=Req) ->
EncMsg = antidote_pb_codec:encode(Msg),
EncMsg = antidote_pb_codec:encode_msg(Msg),
{Req, EncMsg}.

%% maybe_reply({reply, Reply, State = #state{active = Request}}) ->
Expand Down
8 changes: 4 additions & 4 deletions tools.mk
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
REBAR ?= $(shell pwd)/rebar3

test: compile
${REBAR} eunit skip_deps=true
${REBAR} eunit

docs:
${REBAR} doc skip_deps=true
${REBAR} doc

xref: compile
${REBAR} xref skip_deps=true
${REBAR} xref

dialyzer: compile
${REBAR} dialyzer
${REBAR} dialyzer

0 comments on commit 1721795

Please sign in to comment.