Now connection handler will wait up to 1 second in flush() to ensure everything was sent. More elegant way would be to wait BLYNK_TIMEOUT_MS instead of hardcoded 1000ms.
However, it looks like a bug in connection implementation in Blynk library. It will cause frequent connection drops, when there is some latency on network, even much smaller than BLYNK_TIMEOUT_MS set in BlynkConfig.h
Anyway, I’m very disappointed at Blynk library code quality. It looks very amateur. They are mixing C-like structural programming with C++ features, placing function bodies inside header files, multiple ‘fix’ macro are flying around (e.g. YIELD_FIX()). Generally a bunch of bad programming pratices.
Sometimes I think it would be nice to write Blynk client at my own, to match my requirements and provide more reliability.
Really painful sometimes to use in object oriented project or even not single file project.