Fix SA2003, deferred Lock right after locking

This commit is contained in:
Pontus Leitzler 2016-11-14 17:16:38 +00:00
parent 28d273c8b2
commit f3a5057968

View File

@ -121,7 +121,7 @@ func (r *ServiceRegistry) WatchServices(ctx api.Context, options *api.ListOption
func (r *ServiceRegistry) ExportService(ctx api.Context, name string, options unversioned.ExportOptions) (*api.Service, error) {
r.mu.Lock()
defer r.mu.Lock()
defer r.mu.Unlock()
return r.Service, r.Err
}