Fix metro websocket reconnect logic
Fix metro websocket reconnect logic

Summary:
This diff fixes the reconnect logic with the metro websockets which is causing the app to not re-connect when metro crashes. To demonstrate the issue, consider the following video:

{F156029086}

On the left we have metro, on the right is the xcode console with some logging to show the reconnecting phase. When we kill the metro server you can see the app tries to reconnect once and that's it - when metro is started back up, you can see the notification that there are no apps running and can also see that cmd+opt+r doesn't work anymore

I updated the logic to optimistically start the connection and if it's still unavailable to retry again after the timeout

[iOS][Fixed] - Metro websocket reconnect logic

Reviewed By: shergin

Differential Revision: D14961433

fbshipit-source-id: 0569aa169dc9f538a7e4a8d04e99de39f2e9b3f9

pandiaraj44/react-native,javache/react-native,exponentjs/react-native,arthuralee/react-native,javache/react-native,janicduplessis/react-native,janicduplessis/react-native,pandiaraj44/react-native,exponent/react-native,javache/react-native,exponentjs/react-native,facebook/react-native,arthuralee/react-native,exponentjs/react-native,exponent/react-native,arthuralee/react-native,hammerandchisel/react-native,facebook/react-native,janicduplessis/react-native,janicduplessis/react-native,arthuralee/react-native,pandiaraj44/react-native,arthuralee/react-native,exponent/react-native,hammerandchisel/react-native,pandiaraj44/react-native,hoangpham95/react-native,facebook/react-native,facebook/react-native,hoangpham95/react-native,hammerandchisel/react-native,hoangpham95/react-native,myntra/react-native,exponent/react-native,javache/react-native,javache/react-native,hammerandchisel/react-native,pandiaraj44/react-native,pandiaraj44/react-native,hoangpham95/react-native,hammerandchisel/react-native,exponent/react-native,exponentjs/react-native,hammerandchisel/react-native,myntra/react-native,hammerandchisel/react-native,exponentjs/react-native,hoangpham95/react-native,exponent/react-native,janicduplessis/react-native,exponentjs/react-native,janicduplessis/react-native,myntra/react-native,myntra/react-native,myntra/react-native,facebook/react-native,myntra/react-native,hoangpham95/react-native,hoangpham95/react-native,myntra/react-native,pandiaraj44/react-native,janicduplessis/react-native,exponent/react-native,exponentjs/react-native,myntra/react-native,javache/react-native,facebook/react-native,hoangpham95/react-native,myntra/react-native,janicduplessis/react-native,facebook/react-native,javache/react-native,hammerandchisel/react-native,facebook/react-native,javache/react-native,exponent/react-native,facebook/react-native,pandiaraj44/react-native,exponentjs/react-native,javache/react-native