mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 777884 - Fix code in watcher to reboot if maximum number of failed ping attempts exceeded;r=jmaher
This commit is contained in:
parent
67b502d665
commit
bd9b2fd80f
@ -905,10 +905,15 @@ public class WatcherService extends Service
|
||||
if (nMaxStrikes > 0)
|
||||
{
|
||||
String sRet = SendPing(sPingTarget);
|
||||
if (!sRet.contains("3 received") && ++nStrikes >= nMaxStrikes)
|
||||
if (!sRet.contains("3 received"))
|
||||
{
|
||||
Log.e("Watcher", String.format("Number of failed ping attempts to %s (%s) exceeded maximum (%s), running reboot!", sPingTarget, nStrikes, nMaxStrikes));
|
||||
RunReboot(null);
|
||||
Log.i("Watcher", String.format("Failed ping attempt (remaining: %s)!",
|
||||
nMaxStrikes - nStrikes));
|
||||
if (++nStrikes >= nMaxStrikes)
|
||||
{
|
||||
Log.e("Watcher", String.format("Number of failed ping attempts to %s (%s) exceeded maximum (%s), running reboot!", sPingTarget, nStrikes, nMaxStrikes));
|
||||
RunReboot(null);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user