in reply to Re^5: Socket deadlock doubt in code
in thread Socket deadlock doubt in code

Sorry, my mistake. I would think the problem is your DNS set up since your gethostbyaddr code works fine here.