Skip to content

Commit

Permalink
Remove unrelated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
alfred2g committed Sep 11, 2023
1 parent 4dd3e9a commit 0652c33
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions samples/BasicConnect/src/main/java/basicconnect/BasicConnect.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
import software.amazon.awssdk.crt.mqtt.MqttClientConnectionEvents;
import software.amazon.awssdk.crt.http.HttpProxyOptions;
import software.amazon.awssdk.iot.AwsIotMqttConnectionBuilder;
import software.amazon.awssdk.crt.mqtt.OnConnectionSuccessReturn;
import software.amazon.awssdk.crt.mqtt.OnConnectionFailureReturn;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.CompletableFuture;
Expand Down Expand Up @@ -63,23 +61,6 @@ public void onConnectionInterrupted(int errorCode) {
public void onConnectionResumed(boolean sessionPresent) {
System.out.println("Connection resumed: " + (sessionPresent ? "existing session" : "clean session"));
}

@Override public
void onConnectionSuccess(OnConnectionSuccessReturn data) {
try{
int n = 3;
System.out.println(n/0);
} catch (ArithmeticException e) {
e.printStackTrace();
}
System.out.println("Connection succeess2: " + (data.getSessionPresent() ? "existing session" : "clean session"));
}

@Override public
void onConnectionFailure(OnConnectionFailureReturn data) {
int errorCode = data.getErrorCode();
System.out.println("Connection failure: " + errorCode + ": " + CRT.awsErrorString(errorCode));
}
};

try {
Expand Down

0 comments on commit 0652c33

Please sign in to comment.