summaryrefslogtreecommitdiff
path: root/src/tda.erl
diff options
context:
space:
mode:
Diffstat (limited to 'src/tda.erl')
-rw-r--r--src/tda.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/tda.erl b/src/tda.erl
index 7f3eba7..c151df7 100644
--- a/src/tda.erl
+++ b/src/tda.erl
@@ -67,7 +67,12 @@ decode(Data) ->
acse ->
{ok, Acse} = acse:decode(Data),
io:format("ACSE> ~p~n", [Acse]),
- acse:dispatch(Acse)
+ case acse:dispatch(Acse) of
+ error ->
+ stop();
+ _ ->
+ ok
+ end
end.
dispatch(<<Head:8,_/binary>>) ->