diff options
author | Brian Cully <bjc@kublai.com> | 2008-03-02 14:36:53 -0500 |
---|---|---|
committer | Brian Cully <github.20.shmit@spamgourmet.com> | 2008-03-02 14:36:53 -0500 |
commit | 44e3142e90d13e20797786ee54a1d851628321f8 (patch) | |
tree | 166a5f0e4a6d2b6cd192a46507aa9b20734183e8 /src | |
parent | 2b13b1cd11c874657f8be82077fda38979e59b59 (diff) | |
download | mysqlerl-44e3142e90d13e20797786ee54a1d851628321f8.tar.gz mysqlerl-44e3142e90d13e20797786ee54a1d851628321f8.zip |
Use pattern match, not guard.
Diffstat (limited to 'src')
-rw-r--r-- | src/mysqlerl_connection.erl | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mysqlerl_connection.erl b/src/mysqlerl_connection.erl index a0b3062..495f841 100644 --- a/src/mysqlerl_connection.erl +++ b/src/mysqlerl_connection.erl @@ -54,12 +54,10 @@ handle_call(Request, _From, State) -> handle_cast(_Request, State) -> {noreply, State}. -handle_info({'EXIT', Pid, _Reason}, State) - when Pid == State#state.owner -> +handle_info({'EXIT', Pid, _Reason}, #state{owner = Pid} = State) -> io:format("DEBUG: owner ~p shut down.~n", [Pid]), {stop, normal, State}; -handle_info({'EXIT', Ref, Reason}, State) - when Ref == State#state.ref -> +handle_info({'EXIT', Ref, Reason}, #state{ref = Ref} = State) -> io:format("DEBUG: Port ~p closed on ~p.~n", [Ref, State]), {stop, #port_closed{reason = Reason}, State}. |