Merge pull request #949 from Lardjo/patch-1

Added closing parenthesis
Prevent a deadlock if ThreadedResolver resolves a unicode hostname at module-import time.