Clear buffer on reconnect & check poll() result

Clear the buffer again whenever we have to reconnect. It's unclear
this matters in normal operation, but this precludes some failure
modes.

Check poll() for an error return like ENOMEM.

Bug: 315482121
Test: Treehugger
Change-Id: I67fb6d73bde6a8f54ce297e5269641abea48b9b0
1 file changed