def shutdown(opts):

    log.debug('Proxy module {0} shutting down!!'.format(opts['id']))
    try:
        thisproxy['conn'].close()

    except Exception:
        pass
This is called when the proxy-minion is exiting to make sure the
dataset/ETHPy150Open saltstack/salt/salt/proxy/junos.py/shutdown