clarify notifyNetMessagerRestart
This commit is contained in:
parent
df4199d7e3
commit
8587485994
2 changed files with 9 additions and 1 deletions
|
@ -29,6 +29,10 @@ notifyNetMessagerRestart :: Assistant ()
|
||||||
notifyNetMessagerRestart =
|
notifyNetMessagerRestart =
|
||||||
flip writeSV () <<~ (netMessagerRestart . netMessager)
|
flip writeSV () <<~ (netMessagerRestart . netMessager)
|
||||||
|
|
||||||
|
{- This can be used to get an early indication if the network has
|
||||||
|
- changed, to immediately restart a connection. However, that is not
|
||||||
|
- available on all systems, so clients also need to deal with
|
||||||
|
- restarting dropped connections in the usual way. -}
|
||||||
waitNetMessagerRestart :: Assistant ()
|
waitNetMessagerRestart :: Assistant ()
|
||||||
waitNetMessagerRestart = readSV <<~ (netMessagerRestart . netMessager)
|
waitNetMessagerRestart = readSV <<~ (netMessagerRestart . netMessager)
|
||||||
|
|
||||||
|
|
|
@ -39,7 +39,11 @@ netWatcherThread = thread noop
|
||||||
- network connection changes, but it also ensures that
|
- network connection changes, but it also ensures that
|
||||||
- any networked remotes that may have not been routable for a
|
- any networked remotes that may have not been routable for a
|
||||||
- while (despite the local network staying up), are synced with
|
- while (despite the local network staying up), are synced with
|
||||||
- periodically. -}
|
- periodically.
|
||||||
|
-
|
||||||
|
- Note that it does not call notifyNetMessagerRestart, because
|
||||||
|
- it doesn't know that the network has changed.
|
||||||
|
-}
|
||||||
netWatcherFallbackThread :: NamedThread
|
netWatcherFallbackThread :: NamedThread
|
||||||
netWatcherFallbackThread = namedThread "NetWatcherFallback" $
|
netWatcherFallbackThread = namedThread "NetWatcherFallback" $
|
||||||
runEvery (Seconds 3600) <~> handleConnection
|
runEvery (Seconds 3600) <~> handleConnection
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue