fix
This commit is contained in:
parent
881dc36e62
commit
98501ad6c5
@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
%% API
|
%% API
|
||||||
-export([start_link/1, stop/0]).
|
-export([start_link/1, stop/0]).
|
||||||
-export([test/0]).
|
-export([test/0, ping/0]).
|
||||||
|
|
||||||
%% gen_server callbacks
|
%% gen_server callbacks
|
||||||
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
|
-export([init/1, handle_call/3, handle_cast/2, handle_info/2, terminate/2, code_change/3]).
|
||||||
@ -74,6 +74,10 @@ test() ->
|
|||||||
stop() ->
|
stop() ->
|
||||||
gen_server:stop(?MODULE).
|
gen_server:stop(?MODULE).
|
||||||
|
|
||||||
|
ping() ->
|
||||||
|
Pid = whereis(?MODULE),
|
||||||
|
erlang:start_timer(0, Pid, ping_ticker).
|
||||||
|
|
||||||
%% @doc Spawns the server and registers the local name (unique)
|
%% @doc Spawns the server and registers the local name (unique)
|
||||||
-spec(start_link(UUID :: binary()) ->
|
-spec(start_link(UUID :: binary()) ->
|
||||||
{ok, Pid :: pid()} | ignore | {error, Reason :: term()}).
|
{ok, Pid :: pid()} | ignore | {error, Reason :: term()}).
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user