If poll times out, verify by doing a non-blocking read. This does not cloak any bytes read earlier. You can even do in addition to what you have already added.
The higher level code can decide how it would like to handle the results. In this case the changes to HTSPConnection.cpp would be obsolete.