fixed initServer fail problem

fixed issue #1213  which says that when you start the server without assigned IP, it will failed if you do not have ipv6, and only have ipv4.