Commit 24bf24d6 authored by Leonardo Aramaki's avatar Leonardo Aramaki

Removed unused imports and RxWebSocketCallback Failure class

parent 40a217f0
...@@ -378,10 +378,8 @@ public class DDPClientImpl { ...@@ -378,10 +378,8 @@ public class DDPClientImpl {
private void sendMessage(String msg, @Nullable JSONBuilder json, private void sendMessage(String msg, @Nullable JSONBuilder json,
TaskCompletionSource<?> taskForSetError) { TaskCompletionSource<?> taskForSetError) {
if (!sendMessage(msg, json)) { if (!sendMessage(msg, json) && taskForSetError != null) {
if (taskForSetError != null) { taskForSetError.trySetError(new DDPClientCallback.Closed(client));
taskForSetError.trySetError(new DDPClientCallback.Closed(client));
}
} }
} }
......
package chat.rocket.android_ddp.rx; package chat.rocket.android_ddp.rx;
import static android.R.attr.resizeable;
import static android.R.attr.type;
import chat.rocket.android.log.RCLog; import chat.rocket.android.log.RCLog;
import okhttp3.Response; import okhttp3.Response;
import okhttp3.WebSocket; import okhttp3.WebSocket;
...@@ -35,27 +32,6 @@ public class RxWebSocketCallback { ...@@ -35,27 +32,6 @@ public class RxWebSocketCallback {
} }
} }
public static class Failure extends Base {
public Response response;
public Failure(WebSocket websocket, Throwable err, Response response) {
super("Failure", websocket);
this.response = response;
if (response != null && response.body() != null) {
this.response.body().close();
}
}
@Override
public String toString() {
if (response != null) {
return "[" + type + "] " + response.message();
} else {
return super.toString();
}
}
}
public static class Message extends Base { public static class Message extends Base {
public String responseBodyString; public String responseBodyString;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment