sockets – Network is unreachable: connect

sockets – Network is unreachable: connect

You are facing a connection breakdown. Does this happen in 3G, WiFi or plain connection on a computer?

Anyway, you must assume that the connection may be lost from time to time, when writing your app. For example, with mobiles, this happens frequently in the tube, in basements, etc. With PC apps, this is less frequent but occurs sometimes.

A retry can be a good solution. And a clean error message that explains the network is not available at this moment too.

Network is unreachable means just that. Youre not connected to a network. Its something outside of your program. Could be a bad OS setting, NIC, router, etc.

sockets – Network is unreachable: connect

I faced situation of getting not sometimes but every time. Ive added to java command line and my program started to work properly.

Leave a Reply

Your email address will not be published. Required fields are marked *