Harden Connection.discard

git-svn-id: https://code.downthemall.net/repos/trunk@3767 43940e1f-b481-bb45-89eb-5c6a4bf3d40a
Fixup chunk closing

git-svn-id: https://code.downthemall.net/repos/trunk@3768 43940e1f-b481-bb45-89eb-5c6a4bf3d40a