[erlang-questions] Erlang and sleep mode under Windows
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 <> wrote:
> 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.
> 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.
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions