Cleanup routines should now use routeEntry instead of mountEntry.

This commit is contained in:
Lassi Pölönen 2015-09-11 13:40:31 +03:00
parent a769c1231b
commit be1b9e5a36
2 changed files with 3 additions and 3 deletions

View File

@ -468,7 +468,7 @@ func (c *Core) unloadMounts() error {
prefix := e.Path
b, ok := c.router.root.Get(prefix)
if ok {
b.(*mountEntry).backend.Cleanup()
b.(*routeEntry).backend.Cleanup()
}
}
}

View File

@ -77,9 +77,9 @@ func (r *Router) Unmount(prefix string) error {
defer r.l.Unlock()
// Call backend's Cleanup routine
me, ok := r.root.Get(prefix)
re, ok := r.root.Get(prefix)
if ok {
me.(*mountEntry).backend.Cleanup()
re.(*routeEntry).backend.Cleanup()
}
r.root.Delete(prefix)
return nil