Remove router.doAdmin and switchTable.doAdmin

This commit is contained in:
Neil Alexander 2019-08-28 12:17:19 +01:00
parent a8b323acdd
commit 5d7d84f827
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
8 changed files with 15 additions and 25 deletions

View file

@ -92,7 +92,9 @@ func (c *Conn) setMTU(from phony.Actor, mtu uint16) {
func (c *Conn) search() error {
var sinfo *searchInfo
var isIn bool
c.core.router.doAdmin(func() { sinfo, isIn = c.core.router.searches.searches[*c.nodeID] })
phony.Block(c.core.router, func() {
sinfo, isIn = c.core.router.searches.searches[*c.nodeID]
})
if !isIn {
done := make(chan struct{}, 1)
var sess *sessionInfo
@ -106,7 +108,7 @@ func (c *Conn) search() error {
default:
}
}
c.core.router.doAdmin(func() {
phony.Block(c.core.router, func() {
sinfo = c.core.router.searches.newIterSearch(c.nodeID, c.nodeMask, searchCompleted)
sinfo.continueSearch()
})