Skip to content

Commit 11a8def

Browse files
committed
Fix bugzilla bug 442845
Change-Id: Iae81ddf83366d72ce624bf207a1ebbea43570f67 Signed-off-by: zyang5e4 <zyyangbj@cn.ibm.com>
1 parent 5a652d6 commit 11a8def

1 file changed

Lines changed: 0 additions & 8 deletions

File tree

  • org.eclipse.paho.android.service/org.eclipse.paho.android.service/src/org/eclipse/paho/android/service

org.eclipse.paho.android.service/org.eclipse.paho.android.service/src/org/eclipse/paho/android/service/MqttAndroidClient.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -347,14 +347,6 @@ public IMqttToken connect(Object userContext, IMqttActionListener callback)
347347
public IMqttToken connect(MqttConnectOptions options, Object userContext,
348348
IMqttActionListener callback) throws MqttException {
349349

350-
//check to see if there is a network connection where we can send data before attempting the connect
351-
ConnectivityManager conManager = (ConnectivityManager) myContext.getSystemService(Context.CONNECTIVITY_SERVICE);
352-
353-
NetworkInfo netInf = conManager.getActiveNetworkInfo();
354-
if ((netInf == null) || !netInf.isConnected()) {
355-
throw new MqttException(MqttException.REASON_CODE_BROKER_UNAVAILABLE);
356-
}
357-
358350
IMqttToken token = new MqttTokenAndroid(this, userContext,
359351
callback);
360352

0 commit comments

Comments
 (0)