   ///
   /// - Parameter callback: block executed every time a new connectivity state is detected
   public func subscribe(callback: @escaping (ConnectivityState) -> Void) {
-    let observer = ConnectivityObserver(underlyingChannel: underlyingChannel, currentState: connectivityState(), callback: callback)
-    connectivityObservers.append(observer)
+    connectivityObservers.append(ConnectivityObserver(underlyingChannel: underlyingChannel, currentState: connectivityState(), callback: callback))
   }
 }
 

  }

  deinit {
    cgrpc_channel_destroy(underlyingChannel)
    completionQueue.shutdown()
  }

        }
      }
    }
    
    func shutdown() {
      completionQueue.shutdown()
    }
  }
}

