get code running in the netns test again, remove unnecessary allocations that were found in profiling

This commit is contained in:
Arceliar 2019-02-05 17:39:59 -06:00
parent f747f259b3
commit 41f49faaa0
3 changed files with 19 additions and 15 deletions

View file

@ -388,7 +388,11 @@ func (a *admin) start() error {
// cleans up when stopping
func (a *admin) close() error {
return a.listener.Close()
if a.listener != nil {
return a.listener.Close()
} else {
return nil
}
}
// listen is run by start and manages API connections.