remove redunant code and cleanup (#1970)
remove redunant code and cleanup (#1970)

* remove redundant code

* check invalid ip address first

* remove redundant code

* cleanup

Co-authored-by: 刘海洋 <7fab09b495dc7fd15c08e04389e64a19a7626c4f@snqu.com>
micro/go-micro