title: Android React Native stuck at splashscreen
body: <p>Sometimes, after being for a long time in background, my app doesn't load and get stuck at the splashscreen.</p>
  
  <p>I was able to reproduce this in debug mode by:<br>
  - launching the app<br>
  - using debug js remotely<br>
  - kill the application<br>
  - launching the app</p>
  
  <p>And in release mode by:<br>
  - launching the app<br>
  - go in Parameters<br>
  - dev options<br>
  - enable don't keep activities<br>
  - launching the app again</p>
  
  <p>If I try to reproduce this bug with the release method while in debug mode i get the following error:</p>
  
  <pre><code>    Process: com.situaction, PID: 22308
      java.lang.RuntimeException: An error occurred while executing doInBackground()
          at android.os.AsyncTask$3.done(AsyncTask.java:318)
          at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
          at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
          at java.util.concurrent.FutureTask.run(FutureTask.java:242)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
          at java.lang.Thread.run(Thread.java:761)
       Caused by: java.lang.IllegalStateException: closed
          at okhttp3.internal.ws.RealWebSocket.close(RealWebSocket.java:164)
          at com.facebook.react.packagerconnection.ReconnectingWebSocket.closeWebSocketQuietly(ReconnectingWebSocket.java:110)
          at com.facebook.react.packagerconnection.ReconnectingWebSocket.closeQuietly(ReconnectingWebSocket.java:103)
          at com.facebook.react.packagerconnection.JSPackagerClient.close(JSPackagerClient.java:96)
          at com.facebook.react.devsupport.DevServerHelper$2.doInBackground(DevServerHelper.java:158)
          at com.facebook.react.devsupport.DevServerHelper$2.doInBackground(DevServerHelper.java:154)
          at android.os.AsyncTask$2.call(AsyncTask.java:304)
          at java.util.concurrent.FutureTask.run(FutureTask.java:237)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133) 
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607) 
          at java.lang.Thread.run(Thread.java:761)
  </code></pre>
  
  <p>It seems to be linked to react-native-navigation and/or react-native-redux
  so here is my dependencies:  </p>
  
  <pre><code>"react": "16.0.0-alpha.6",
  "react-native": "0.43.3",
  "react-native-navigation": "1.1.398",
  "react-redux": "^5.0.5",
  "redux": "^3.7.0",
  "redux-logger": "^3.0.1",
  "redux-observable": "^0.14.1",
  "redux-persist": "^4.8.1",
  "redux-persist-transform-filter": "0.0.13",
  </code></pre>