ClientContext: break timeout delays also on error while writing or connecting (#6454)
ClientContext: break timeout delays also on error while writing or connecting (#6454)

This PR stops the 1ms-delay loop also when a tcp error occurs (previously this was done only when tcp had just connected or a write/send had succeeded).
The tcp error can be any, in this case with pubsubclient it is "connection refused" after the mqtt server disappeared and pubsubclient tries to reconnect.
sticilface/Arduino,esp8266/Arduino,sticilface/Arduino,sticilface/Arduino,sticilface/Arduino,esp8266/Arduino,sticilface/Arduino,esp8266/Arduino,esp8266/Arduino,esp8266/Arduino