Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

clear /etc/resolv.conf cache on posix systems when reattempting connection #299

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

bhelm
Copy link

@bhelm bhelm commented Jun 20, 2014

see #298

@bhelm
Copy link
Author

bhelm commented Oct 13, 2014

please merge or add some critic, i would like to see this integrated as i have to patch it every time i deploy a sleekxmpp based solution.

# libc caches /etc/resolv.conf. try to flush the cache, see https://github.com/fritzy/SleekXMPP/issues/298
try:
log.debug("flushing /etc/resolv.conf cache")
libc = ctypes.CDLL('libc.so.6')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fail for FreeBSD 9.2, but will succeed if you specify just 'libc.so', but both variants will fail for FreeBSD 10 where 'libc.so.7' is needed. May be figure out some more solid solution to find out right 'lib.so'?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants