discovery: fix discovery for not working on customized discovery service
Merge pull request #1510 from xiangli-cmu/fix_discovery

discovery: fix discovery for not working on customized discovery service