Actually, nevermind. It appears that receiving an EOF from a stream tells it when to stop 'reading', not necessarily that the stream is closed. What a weird behavior.