restart socket on fail