I'm working on the 9160 SoC using nRF Connect SDK 1.8.0 to send MQTT messages to an AWS endpoint. The messages correctly are able to send and the device works for 5-10 minutes but then fails giving error -128. I looked this up to be ENOTCONN which makes me think that something is causing the connection to time out, but I couldn't find anything in the AWS documentation or SDK 1.8.0 documentation that would cause this. Is there any reason that would cause this disconnection, and is there any example of the protocol for staying connected? The goal of my program is to be constantly ready to send MQTT messages when contacted over BLE so I want to always be connected if possible.
Thanks!