About heartbeat packet

I use smack 4.2.0-beta2 in my application.My phone is connected to wifi.When I pull the wire in WAN, smack don’t know the situation, which lasts for several minutes.

So my question is, does smack implement heartbeat function? Is it work?