def close(self):
        self._closed = True
        if self._heartbeat_task is not None:
            self._heartbeat_task.kill()
            self._heartbeat_task = None
        if self._recv_task is not None:
            self._recv_task.kill()
            self._recv_task = None
        if self._channel is not None:
            self._channel.close()
            self._channel = None
dataset/ETHPy150Open 0rpc/zerorpc-python/zerorpc/heartbeat.py/HeartBeatOnChannel.close/original