Close stream after sending