{"action":"opened","issue":{"url":"https://api.github.com/repos/novastone-media/MQTT-Client-Framework/issues/469","repository_url":"https://api.github.com/repos/novastone-media/MQTT-Client-Framework","labels_url":"https://api.github.com/repos/novastone-media/MQTT-Client-Framework/issues/469/labels{/name}","comments_url":"https://api.github.com/repos/novastone-media/MQTT-Client-Framework/issues/469/comments","events_url":"https://api.github.com/repos/novastone-media/MQTT-Client-Framework/issues/469/events","html_url":"https://github.com/novastone-media/MQTT-Client-Framework/issues/469","id":325417172,"number":469,"title":"How do I adapt this code to maintain the connection in background?","user":{"login":"NathanMrtns","id":5864842,"avatar_url":"https://avatars0.githubusercontent.com/u/5864842?v=4","gravatar_id":"","url":"https://api.github.com/users/NathanMrtns","html_url":"https://github.com/NathanMrtns","followers_url":"https://api.github.com/users/NathanMrtns/followers","following_url":"https://api.github.com/users/NathanMrtns/following{/other_user}","gists_url":"https://api.github.com/users/NathanMrtns/gists{/gist_id}","starred_url":"https://api.github.com/users/NathanMrtns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NathanMrtns/subscriptions","organizations_url":"https://api.github.com/users/NathanMrtns/orgs","repos_url":"https://api.github.com/users/NathanMrtns/repos","events_url":"https://api.github.com/users/NathanMrtns/events{/privacy}","received_events_url":"https://api.github.com/users/NathanMrtns/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-22T18:42:53Z","updated_at":"2018-05-22T18:42:53Z","closed_at":null,"author_association":"NONE","body":"Hi, every time the app goes to background the connection closes. I've seen some codes here that is possible to maintain the connection but I don't know how to adapt. Any help?\r\n```\r\n        let session = MQTTSession()\r\n        let transport: MQTTWebsocketTransport = MQTTWebsocketTransport()\r\n        transport.host = \"host address\"\r\n        transport.path = \"/mqtt\"\r\n        transport.port = port\r\n        transport.tls = true\r\n        session.transport = transport\r\n        session.userName = \"username\"\r\n        session.password = \"pass\"\r\n        session.protocolLevel = .version311\r\n        session.clientId = String(ProcessInfo().processIdentifier)\r\n        session.connect()\r\n```"}}
{"actor":{"display_login":"NathanMrtns"}}