added independent socket timeout
moved ip resolution after timeout set
moved ip resolution after timeout set