Smack 4.4.0-beta2: endpoint in connectUsingConfiguration may contain zero InetAddress leading to NPE

Below is an android crash report given by google play store field feedback, when running aTalk with smack-core 4.4.0-beta2. It seems that during network reconnect, the endpoint may contain zero InetAdress, the statement in connectUsingConfiguration i.e.

inetAddresses = endpoint.getInetAddresses().iterator()

causes android to throw NPE and crashes aTalk. Would appreciate if smack team can take a look and implement null check before proceed.

Stack trace
Occurrence 1 of 1

Crash *brightness_1* [Huawei Honor Play](https://play.google.com/console/u/0/developers/5361614842362677306/app/4973553957992441993/vitals/crashes/58270104/details?installedFrom=PLAY_STORE&days=30#) *brightness_1* Android 8.1 (SDK 27) *brightness_1* 1142.aab *brightness_1* 12 hours ago

java.lang.NullPointerException: 
  at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectUsingConfiguration (XMPPTCPConnection.java:606)
  at org.jivesoftware.smack.tcp.XMPPTCPConnection.connectInternal (XMPPTCPConnection.java:846)
  at org.jivesoftware.smack.AbstractXMPPConnection.connect (AbstractXMPPConnection.java:530)
  at org.jivesoftware.smack.ReconnectionManager$2.run (ReconnectionManager.java:282)
  at java.lang.Thread.run (Thread.java:784)

Thanks for reporting. This should be fixed with

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.