title: aws-amplify subscription to appsync stops after 2 mins
body: <p>When subscribing to appsync using amplify using <code>API.graphql(graphqlOperation(subscription));</code> the subscription works for a while, but the I get socket closed error.</p>
  
  <pre><code>CONSOLE LOG [native code]: {
  "[INFO] 24:12.893 MqttOverWSProvider": {
  "errorCode": 8,
  "errorMessage": "AMQJS0008I Socket closed.",
  "uri": "wss://&lt;uri&gt;
  </code></pre>
  
  <p>The same subscription works in the appsync console without any issue and I get events as long as the subscription is running, but stops after around 2 mins on device.</p>
  
  <p>code involved </p>
  
  <pre><code>let cs = await this.subscriptionService.appSubscriptions();
      this.sbscriptions = this.cs.subscribe({
        next: data =&gt; {
          console.dir(data);
                },
        error: error =&gt; console.dir(JSON.stringify(error)),
        close: () =&gt; console.log("closed")
   });
  </code></pre>
  
  <p>This part of code throws no error, and the error shown above is only visible when setting <code>LOG_LEVEL = DEBUG</code></p>
  
  <p><strong>NOTE</strong> : The subscription does work for a while before this error shows up, and in that time I can see all the events that I trigger from console.</p>