~mdw
/
tripe
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
svc/conntrack.in: Hoist `netupdown' above `kickpeers'.
[tripe]
/
svc
/
conntrack.in
diff --git
a/svc/conntrack.in
b/svc/conntrack.in
index
3368295
..
1ccbae6
100644
(file)
--- a/
svc/conntrack.in
+++ b/
svc/conntrack.in
@@
-237,6
+237,16
@@
def localaddr(peer):
sk.close()
_kick = T.Queue()
sk.close()
_kick = T.Queue()
+
+def netupdown(upness, reason):
+ """
+ Add or kill peers according to whether the network is up or down.
+
+ UPNESS is true if the network is up, or false if it's down.
+ """
+
+ _kick.put((upness, reason))
+
def kickpeers():
while True:
upness, reason = _kick.get()
def kickpeers():
while True:
upness, reason = _kick.get()
@@
-332,15
+342,6
@@
def kickpeers():
SM.notify('conntrack', upness and 'up' or 'down', *select + reason)
for c in changes: c()
SM.notify('conntrack', upness and 'up' or 'down', *select + reason)
for c in changes: c()
-def netupdown(upness, reason):
- """
- Add or kill peers according to whether the network is up or down.
-
- UPNESS is true if the network is up, or false if it's down.
- """
-
- _kick.put((upness, reason))
-
###--------------------------------------------------------------------------
### NetworkManager monitor.
###--------------------------------------------------------------------------
### NetworkManager monitor.