How long are your time constants?
AFAICT you are forcing a handshake within 15 seconds. A full handshake should only be triggered once. Having it trigger repeatedly would only result in extra data consumption and potentially interfere with ongoing connections.
BTW, you may have seen millis()
timing done as if (millis() - prevTime > timeout)
instead of if (millis() > nextTime)
. The reason behind that is explained here