[PATCH] flow: close socket fd on error