[PATCH] Fix cli socket close due to io buffer full