[erlang-questions] Erlang and sleep mode under Windows

Sergej Jurečko sergej.jurecko@REDACTED
Thu Sep 7 07:26:51 CEST 2017

Use erlang:send_after and measure the time it actually took for the message to arrive. If it’s much longer the machine was in sleep mode. Don’t know about the networking issues. You could do init:restart() if it’s really necessary.


> On 7 Sep 2017, at 06:49, Frank Muller <frank.muller.erl@REDACTED> wrote:
> Hi
> I’ve a simple Erlang application under Windows. It runs under erlsrv.exe and all is good.
> However, I’ve noticed that when the machine enters sleep mode, my app "must be manually restarted" to work again.
> The reason is still not clear to me, but i suspect the fact that it loses internet connectivity.
> Questions:
> 1. Can I detect the sleep mode and recover from it programmatically?
> 2. To avoid restarting the app, is it possible to restart only the networking part of the VM (not even sure if such a thing exits/feasible)?
> Thanks in advance.
> /Frank
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170907/ba390ca9/attachment.htm>

More information about the erlang-questions mailing list