socket calls no longer block forever
fixes for segfault and undetected failures