Introduce the possibility that stream_close blocks