The general contract of close doesn't enforce this, and there have been cases where the close doesn't in fact do this (and just drops the connection). I don't think it's wrong to do it as well inside the try, but in the general bug-free case, you're right.