in core/src/main/scala/org/apache/spark/eventhubs/client/EventHubsClient.scala [236:248]
private def cleanup(): Unit = {
pendingWorks.clear()
if (partitionSender != null) {
partitionSender.closeSync()
partitionSender = null
}
if (_client != null) {
ClientConnectionPool.returnClient(ehConf, _client)
_client = null
}
}