SV: Trouble with gen_server

mark@REDACTED mark@REDACTED
Tue Mar 28 16:41:30 CEST 2006


Ok, me being daft there. So how can I handle the timeout? I don't want
the gen_server to die when the call exceeds the timeout, I just want to
be able to reflect that this has happened.

Thanks,

Mark

On Tue, Mar 28, 2006 at 04:20:35PM +0200, Matthias Lang wrote:
> Mark Lee writes:
> 
>  > Ok, as simple as I can get.
>  > 
>  > 1> test:start_link().
>  > {ok,<0.33.0>}
>  > 2> test:test().
>  > ** exited: {timeout,{gen_server,call,[test,test]}} **
>  > 3> test:test().
>  > ** exited: {noproc,{gen_server,call,[test,test]}} **
> 
> Your first line starts the server AND LINKS IT TO THE SHELL.
> 
> So, when your call fails, your shell process dies. And thus your gen
> server must die too.
> 
> If you don't want that to happen, don't link the gen_server to the
> shell.
> 
> Matthias
> 
> 
> 
> !DSPAM:442948ea186885973314758!
> 
> 



More information about the erlang-questions mailing list