When there is no response (and therefore no interrupt) from the DHT device after acquire() is triggered, the state machine is left in the RESPONSE state with the ISR attached. While the ISR is attached, calling attach() again doesn't actually signal the DHT device because pinMode doesn't set the pin to OUTPUT mode. This change detects that failure and resets the state machine and the detaches the ISR.
When there is no response (and therefore no interrupt) from the DHT device after acquire() is triggered, the state machine is left in the RESPONSE state with the ISR attached. While the ISR is attached, calling attach() again doesn't actually signal the DHT device because pinMode doesn't set the pin to OUTPUT mode. This change detects that failure and resets the state machine and the detaches the ISR.