Skip to content
Browse files

don't convert msgs to send to flat binaries

  • Loading branch information...
1 parent 9f4b7ad commit 10397260088173b9db36b3f1e75f547ffca08395 @RJ committed Aug 23, 2012
Showing with 2 additions and 6 deletions.
  1. +2 −6 src/stetson_server.erl
View
8 src/stetson_server.erl
@@ -126,12 +126,8 @@ stat(State, timer, Bucket, N) ->
%% @private Send the formatted binary packet over the udp socket,
%% prepending the ns/namespace
send(#s{sock = Sock, host = Host, port = Port, ns = Ns}, Format, Args) ->
- %% iolist_to_bin even though gen_...:send variants accept deep iolists,
- %% since it makes logging and testing easier
- Msg = iolist_to_binary(io_lib:format("~s." ++ Format, [Ns|Args])),
- case gen_udp:send(Sock, Host, Port, Msg) of
- _Any -> ok
- end.
+ Msg = io_lib:format("~s." ++ Format, [Ns|Args]),
+ gen_udp:send(Sock, Host, Port, Msg).
-spec split_uri(string(), inet:port_number()) -> {nonempty_string(), inet:port_number()}.
%% @private

0 comments on commit 1039726

Please sign in to comment.
Something went wrong with that request. Please try again.