Return the stream id back to the pool in case of a write failure