aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mysqlerl_connection.erl5
-rw-r--r--src/mysqlerl_port_sup.erl5
2 files changed, 3 insertions, 7 deletions
diff --git a/src/mysqlerl_connection.erl b/src/mysqlerl_connection.erl
index 362b807..e009428 100644
--- a/src/mysqlerl_connection.erl
+++ b/src/mysqlerl_connection.erl
@@ -26,8 +26,9 @@ stop(Pid) ->
init([Owner, Host, Port, Database, User, Password, Options]) ->
process_flag(trap_exit, true),
link(Owner),
- {ok, Sup} = mysqlerl_port_sup:start_link(helper(), Host, Port, Database,
- User, Password, Options),
+ {ok, Sup} = supervisor:start_link(mysqlerl_port_sup,
+ [helper(), Host, Port, Database,
+ User, Password, Options]),
{ok, #state{sup = Sup, owner = Owner}}.
terminate(Reason, _State) ->
diff --git a/src/mysqlerl_port_sup.erl b/src/mysqlerl_port_sup.erl
index 3053cdc..f215d48 100644
--- a/src/mysqlerl_port_sup.erl
+++ b/src/mysqlerl_port_sup.erl
@@ -3,13 +3,8 @@
-behavior(supervisor).
--export([start_link/7]).
-export([init/1]).
-start_link(Cmd, Host, Port, Database, User, Password, Options) ->
- supervisor:start_link(?MODULE, [Cmd, Host, Port, Database,
- User, Password, Options]).
-
init([Cmd, Host, Port, Database, User, Password, Options]) ->
Ref = {mysqlerl_port, {mysqlerl_port, start_link,
[Cmd, Host, Port, Database,