Disconnect an existing publisher socket and remove it from the local
        thread's cache.

def pub_close(self):
        '''
        Disconnect an existing publisher socket and remove it from the local
        thread's cache.
        '''
        if hasattr(self._sock_data, 'sock'):
            self._sock_data.sock.close()
            delattr(self._sock_data, 'sock')