Skip to content

Commit 9b10df2

Browse files
rjharmonbrianmay
authored andcommitted
Arrange systemd notification to clarify the meaning
* this spot in the lifecycle is precisely when we know that the remote server is running AND that the local firewall-control daemon is started.
1 parent accb4ec commit 9b10df2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

sshuttle/client.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,11 +518,14 @@ def onroutes(routestr):
518518
# set --auto-nets, we might as well wait for the message first, then
519519
# ignore its contents.
520520
mux.got_routes = None
521-
fw.start()
522-
sdnotify.send(sdnotify.ready(), sdnotify.status('Connected'))
521+
serverready()
523522

524523
mux.got_routes = onroutes
525524

525+
def serverready():
526+
fw.start()
527+
sdnotify.send(sdnotify.ready(), sdnotify.status('Connected'))
528+
526529
def onhostlist(hostlist):
527530
debug2('got host list: %r\n' % hostlist)
528531
for line in hostlist.strip().split():

0 commit comments

Comments
 (0)