lib: Faster termination on exit (ref #6319) (#6329)

This commit is contained in:
Simon Frei
2020-02-13 14:43:00 +01:00
committed by GitHub
parent ca90f4e6af
commit c3637f2191
9 changed files with 71 additions and 28 deletions
+1 -1
View File
@@ -91,7 +91,7 @@ func NewLocal(id protocol.DeviceID, addr string, addrList AddressLister, evLogge
}
// Lookup returns a list of addresses the device is available at.
func (c *localClient) Lookup(device protocol.DeviceID) (addresses []string, err error) {
func (c *localClient) Lookup(_ context.Context, device protocol.DeviceID) (addresses []string, err error) {
if cache, ok := c.Get(device); ok {
if time.Since(cache.when) < CacheLifeTime {
addresses = cache.Addresses