Roberto Found what's causing the problem.
If I leave the app running on my phone for a while it cause the issue. But if I close down the app after each use the wifi module stays connected without a problem
I'm using the android version. Now that you ask it brought it to my attetion that It started happening after I switch to my note 4 from the iPhone 5 it never happened to me while I was using the app on the iPhone
Still cant figure out the problem. It works just fine if I close app. But the minute I forget to close it stops working and I have to disconnect it and reconnect it to make it work