change init() to a normal function so it doesn't get called even when DNS discovery is not enabled
propagate the error up to the caller instead of panic
fix typo
fix err nil checking logic
Merge pull request #12 from jianfeiliao/master

fix dns_discovery init() call breaks in windows