Re-factor clean exiting to be usable in the client also

This commit is contained in:
2013-09-03 22:21:18 -04:00
parent 4eb75e1db1
commit 2dcd08d502
3 changed files with 10 additions and 5 deletions

View File

@ -29,6 +29,8 @@ func init() {
if err != nil {
panic(err)
}
asink.SetupCleanExitOnSignals()
}
const sock_usage = "Socket to use to connect to the Asink server."
@ -60,7 +62,7 @@ func StartServer(args []string) {
go http.Serve(l, nil)
//TODO handle errors from http.Serve?
WaitOnExit()
asink.WaitOnExit()
<-rpcTornDown
}