Don’t do arithmetics with infinity (the atom)

This commit is contained in:
Hans Svensson 2018-03-07 14:27:46 +01:00
parent 4ebb8c8ec9
commit 02fcf8a86c

View File

@ -33,6 +33,8 @@ start_link(TcpSock, Rx, Tx, Owner, Active) ->
send(Noise, Data) ->
gen_server:call(Noise, {send, Data}).
recv(Noise, Length, infinity) ->
gen_server:call(Noise, {recv, Length, infinity}, infinity);
recv(Noise, Length, Timeout) ->
gen_server:call(Noise, {recv, Length, Timeout}, Timeout + 100).