Clear read buffer when it's closed