Problem with smtp_client-1.1
Bengt Kleberg
bengt.kleberg@REDACTED
Wed Jul 5 08:21:02 CEST 2006
On 2006-07-05 06:20, shehan wrote:
> Hi all,
> After sending email , I used smtp_fsm:close(Pid) in my erlang appplication.
> Then following error occured.
According to the example in smtp_fsm.erl this is not an error, but the
expected behaviour/result of smtp_fsm:close(Pid).
> So therefore my application crashed.So how to
> avoid or handle that error to stop crashing??
smtp_fsm:handle_event(close, ...) returns i_have_quit as the Reason (in
{stop,Reason,NewStateData}) and according to the gen_fsm manual :
''Note that for any other reason than normal or shutdown, the gen_fsm is
assumed to terminate due to an error''
so you can change i_have_quit to normal or shutdown to avoid the crash.
fyi: unless you need some of the features only available in
smtp_client-1.1 there is another smtp client (distributed with yaws)
that does not have this problem.
bengt
--
EPO guidelines 1978: "If the contribution to the known art resides
solely in a computer program then the subject matter is not
patentable in whatever manner it may be presented in the claims."
More information about the erlang-questions
mailing list