diff --git a/src/sockjs_session.erl b/src/sockjs_session.erl index 66c5df0..1ed4093 100644 --- a/src/sockjs_session.erl +++ b/src/sockjs_session.erl @@ -14,7 +14,7 @@ -type(handle() :: {?MODULE, {pid(), info()}}). -record(session, {id :: session(), - outbound_queue = queue:new() :: queue(), + outbound_queue = queue:new() :: queue:queue(), response_pid :: pid(), disconnect_tref :: reference(), disconnect_delay = 5000 :: non_neg_integer(), diff --git a/src/sockjs_util.erl b/src/sockjs_util.erl index be3f972..230b672 100644 --- a/src/sockjs_util.erl +++ b/src/sockjs_util.erl @@ -12,13 +12,12 @@ rand32() -> case get(random_seeded) of undefined -> - {MegaSecs, Secs, MicroSecs} = now(), - _ = random:seed(MegaSecs, Secs, MicroSecs), + _ = rand:seed(exsplus, erlang:timestamp()), put(random_seeded, true); _Else -> ok end, - random:uniform(erlang:trunc(math:pow(2,32)))-1. + rand:uniform(erlang:trunc(math:pow(2,32)))-1. -spec encode_frame(frame()) -> iodata().