   }
 
   deinit {
+    connectivityObservers.forEach { $0.shutdown() }
     cgrpc_channel_destroy(underlyingChannel)
     completionQueue.shutdown()
   }

  ///
  /// - 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)
  }
}


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

