removed useless code

Removed an useless code that was causing a segmentation fault when the provided host is a hostname instead an ip address