socket fix for failed socket connections