def __die(self):
        if self.__id and not self.__killed:
            if self.__exhaust and self.__exhaust_mgr:
                # If this is an exhaust cursor and we haven't completely
                # exhausted the result set we *must* close the socket
                # to stop the server from sending more data.
                self.__exhaust_mgr.sock.close()
            else:
                connection = self.__collection.database.connection
                if self.__connection_id is not None:
                    connection.close_cursor(self.__id, self.__connection_id)
                else:
                    connection.close_cursor(self.__id)
        if self.__exhaust and self.__exhaust_mgr:
            self.__exhaust_mgr.close()
        self.__killed = True
REST Cancel a Scheduled Hangup Helper
dataset/ETHPy150Open blynch/CloudMemeBackend/pymongo/cursor.py/Cursor.__die--crossover with--dataset/ETHPy150Open plivo/plivohelper-python/plivohelper.py/REST.cancel_scheduled_hangup