Fixed exception: AttributeError: 'socket' object has no attribute 'cfg_addr'