docs: function maybeReleaseLock() {
      var lock = self.client.lock;
  
      function done(err) {
        log.debug({client: self.client}, 'Closed client sync handler');
        self.client.lock = null;
        self.client = null;
        callback(err);
      }
  
      // No lock
      if(!lock) {
        return done();
      }
      // Lock reference, but it's already unlocked
      if(lock.unlocked) {
        return done();
      }
      // Holding lock, release it
      lock.release(function(err) {
        if(err) {
          log.error({err: err, client: self.client}, 'Error releasing sync lock');
          return done(err);
        }
        done();
      });
    }