- Call onClose before actually closing anything (sending a close message closes the endpoint).
- If onClose throws an exception, call onError.
- After using a blocking send, clear the client buffer in case it gets reused (I have no idea why this is needed ...).

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1560702 13f79535-47bb-0310-9956-ffa450edef68
Revert: Call onClose before actually closing anything (sending a close message closes the endpoint).

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1560704 13f79535-47bb-0310-9956-ffa450edef68