- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
857 lines
23 KiB
Smali
857 lines
23 KiB
Smali
.class public final Lokhttp3/internal/connection/ExchangeFinder;
|
|
.super Ljava/lang/Object;
|
|
.source "SourceFile"
|
|
|
|
|
|
# instance fields
|
|
.field public final address:Lokhttp3/Address;
|
|
|
|
.field public final call:Lokhttp3/Call;
|
|
|
|
.field public connectingConnection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.field public final connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.field public final eventListener:Lokhttp3/EventListener;
|
|
|
|
.field public hasStreamFailure:Z
|
|
|
|
.field public nextRouteToTry:Lokhttp3/Route;
|
|
|
|
.field public routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
|
|
|
|
.field public final routeSelector:Lokhttp3/internal/connection/RouteSelector;
|
|
|
|
.field public final transmitter:Lokhttp3/internal/connection/Transmitter;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lokhttp3/internal/connection/Transmitter;Lokhttp3/internal/connection/RealConnectionPool;Lokhttp3/Address;Lokhttp3/Call;Lokhttp3/EventListener;)V
|
|
.locals 0
|
|
|
|
.line 69
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
iput-object p3, p0, Lokhttp3/internal/connection/ExchangeFinder;->address:Lokhttp3/Address;
|
|
|
|
iput-object p4, p0, Lokhttp3/internal/connection/ExchangeFinder;->call:Lokhttp3/Call;
|
|
|
|
iput-object p5, p0, Lokhttp3/internal/connection/ExchangeFinder;->eventListener:Lokhttp3/EventListener;
|
|
|
|
.line 75
|
|
new-instance p1, Lokhttp3/internal/connection/RouteSelector;
|
|
|
|
iget-object p2, p2, Lokhttp3/internal/connection/RealConnectionPool;->routeDatabase:Lokhttp3/internal/connection/RouteDatabase;
|
|
|
|
invoke-direct {p1, p3, p2, p4, p5}, Lokhttp3/internal/connection/RouteSelector;-><init>(Lokhttp3/Address;Lokhttp3/internal/connection/RouteDatabase;Lokhttp3/Call;Lokhttp3/EventListener;)V
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/ExchangeFinder;->routeSelector:Lokhttp3/internal/connection/RouteSelector;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public connectingConnection()Lokhttp3/internal/connection/RealConnection;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/ExchangeFinder;->connectingConnection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public find(Lokhttp3/OkHttpClient;Lokhttp3/Interceptor$Chain;Z)Lokhttp3/internal/http/ExchangeCodec;
|
|
.locals 7
|
|
|
|
.line 81
|
|
invoke-interface {p2}, Lokhttp3/Interceptor$Chain;->connectTimeoutMillis()I
|
|
|
|
move-result v1
|
|
|
|
.line 82
|
|
invoke-interface {p2}, Lokhttp3/Interceptor$Chain;->readTimeoutMillis()I
|
|
|
|
move-result v2
|
|
|
|
.line 83
|
|
invoke-interface {p2}, Lokhttp3/Interceptor$Chain;->writeTimeoutMillis()I
|
|
|
|
move-result v3
|
|
|
|
.line 84
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->pingIntervalMillis()I
|
|
|
|
move-result v4
|
|
|
|
.line 85
|
|
invoke-virtual {p1}, Lokhttp3/OkHttpClient;->retryOnConnectionFailure()Z
|
|
|
|
move-result v5
|
|
|
|
move-object v0, p0
|
|
|
|
move v6, p3
|
|
|
|
.line 88
|
|
:try_start_0
|
|
invoke-virtual/range {v0 .. v6}, Lokhttp3/internal/connection/ExchangeFinder;->findHealthyConnection(IIIIZZ)Lokhttp3/internal/connection/RealConnection;
|
|
|
|
move-result-object p3
|
|
|
|
.line 90
|
|
invoke-virtual {p3, p1, p2}, Lokhttp3/internal/connection/RealConnection;->newCodec(Lokhttp3/OkHttpClient;Lokhttp3/Interceptor$Chain;)Lokhttp3/internal/http/ExchangeCodec;
|
|
|
|
move-result-object p1
|
|
:try_end_0
|
|
.catch Lokhttp3/internal/connection/RouteException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object p1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
goto :goto_0
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
goto :goto_1
|
|
|
|
.line 95
|
|
:goto_0
|
|
invoke-virtual {p0}, Lokhttp3/internal/connection/ExchangeFinder;->trackFailure()V
|
|
|
|
.line 96
|
|
new-instance p2, Lokhttp3/internal/connection/RouteException;
|
|
|
|
invoke-direct {p2, p1}, Lokhttp3/internal/connection/RouteException;-><init>(Ljava/io/IOException;)V
|
|
|
|
throw p2
|
|
|
|
.line 92
|
|
:goto_1
|
|
invoke-virtual {p0}, Lokhttp3/internal/connection/ExchangeFinder;->trackFailure()V
|
|
|
|
.line 93
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final findConnection(IIIIZ)Lokhttp3/internal/connection/RealConnection;
|
|
.locals 18
|
|
|
|
move-object/from16 v1, p0
|
|
|
|
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 140
|
|
monitor-enter v2
|
|
|
|
:try_start_0
|
|
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
|
|
|
|
.line 141
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/Transmitter;->isCanceled()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_11
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput-boolean v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->hasStreamFailure:Z
|
|
|
|
iget-object v3, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
|
|
|
|
.line 146
|
|
iget-object v4, v3, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
const/4 v5, 0x0
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
.line 147
|
|
iget-boolean v6, v4, Lokhttp3/internal/connection/RealConnection;->noNewExchanges:Z
|
|
|
|
if-eqz v6, :cond_0
|
|
|
|
.line 148
|
|
invoke-virtual {v3}, Lokhttp3/internal/connection/Transmitter;->releaseConnectionNoEvents()Ljava/net/Socket;
|
|
|
|
move-result-object v3
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
goto/16 :goto_9
|
|
|
|
:cond_0
|
|
move-object v3, v5
|
|
|
|
:goto_0
|
|
iget-object v6, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
|
|
|
|
.line 151
|
|
iget-object v7, v6, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
if-eqz v7, :cond_1
|
|
|
|
move-object v4, v5
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
move-object v7, v5
|
|
|
|
:goto_1
|
|
const/4 v8, 0x1
|
|
|
|
if-nez v7, :cond_4
|
|
|
|
iget-object v9, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
iget-object v10, v1, Lokhttp3/internal/connection/ExchangeFinder;->address:Lokhttp3/Address;
|
|
|
|
.line 159
|
|
invoke-virtual {v9, v10, v6, v5, v0}, Lokhttp3/internal/connection/RealConnectionPool;->transmitterAcquirePooledConnection(Lokhttp3/Address;Lokhttp3/internal/connection/Transmitter;Ljava/util/List;Z)Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_2
|
|
|
|
iget-object v6, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
|
|
|
|
.line 161
|
|
iget-object v7, v6, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
move-object v6, v5
|
|
|
|
move v9, v8
|
|
|
|
goto :goto_3
|
|
|
|
:cond_2
|
|
iget-object v6, v1, Lokhttp3/internal/connection/ExchangeFinder;->nextRouteToTry:Lokhttp3/Route;
|
|
|
|
if-eqz v6, :cond_3
|
|
|
|
iput-object v5, v1, Lokhttp3/internal/connection/ExchangeFinder;->nextRouteToTry:Lokhttp3/Route;
|
|
|
|
:goto_2
|
|
move v9, v0
|
|
|
|
goto :goto_3
|
|
|
|
.line 165
|
|
:cond_3
|
|
invoke-virtual/range {p0 .. p0}, Lokhttp3/internal/connection/ExchangeFinder;->retryCurrentRoute()Z
|
|
|
|
move-result v6
|
|
|
|
if-eqz v6, :cond_4
|
|
|
|
iget-object v6, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
|
|
|
|
.line 166
|
|
iget-object v6, v6, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
invoke-virtual {v6}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route;
|
|
|
|
move-result-object v6
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
move v9, v0
|
|
|
|
move-object v6, v5
|
|
|
|
.line 169
|
|
:goto_3
|
|
monitor-exit v2
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 170
|
|
invoke-static {v3}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
|
|
|
|
if-eqz v4, :cond_5
|
|
|
|
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->eventListener:Lokhttp3/EventListener;
|
|
|
|
iget-object v3, v1, Lokhttp3/internal/connection/ExchangeFinder;->call:Lokhttp3/Call;
|
|
|
|
.line 173
|
|
invoke-virtual {v2, v3, v4}, Lokhttp3/EventListener;->connectionReleased(Lokhttp3/Call;Lokhttp3/Connection;)V
|
|
|
|
:cond_5
|
|
if-eqz v9, :cond_6
|
|
|
|
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->eventListener:Lokhttp3/EventListener;
|
|
|
|
iget-object v3, v1, Lokhttp3/internal/connection/ExchangeFinder;->call:Lokhttp3/Call;
|
|
|
|
.line 176
|
|
invoke-virtual {v2, v3, v7}, Lokhttp3/EventListener;->connectionAcquired(Lokhttp3/Call;Lokhttp3/Connection;)V
|
|
|
|
:cond_6
|
|
if-eqz v7, :cond_7
|
|
|
|
return-object v7
|
|
|
|
:cond_7
|
|
if-nez v6, :cond_9
|
|
|
|
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
|
|
|
|
if-eqz v2, :cond_8
|
|
|
|
.line 185
|
|
invoke-virtual {v2}, Lokhttp3/internal/connection/RouteSelector$Selection;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_9
|
|
|
|
:cond_8
|
|
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->routeSelector:Lokhttp3/internal/connection/RouteSelector;
|
|
|
|
.line 187
|
|
invoke-virtual {v2}, Lokhttp3/internal/connection/RouteSelector;->next()Lokhttp3/internal/connection/RouteSelector$Selection;
|
|
|
|
move-result-object v2
|
|
|
|
iput-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
|
|
|
|
move v2, v8
|
|
|
|
goto :goto_4
|
|
|
|
:cond_9
|
|
move v2, v0
|
|
|
|
:goto_4
|
|
iget-object v3, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 191
|
|
monitor-enter v3
|
|
|
|
:try_start_1
|
|
iget-object v4, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
|
|
|
|
.line 192
|
|
invoke-virtual {v4}, Lokhttp3/internal/connection/Transmitter;->isCanceled()Z
|
|
|
|
move-result v4
|
|
|
|
if-nez v4, :cond_10
|
|
|
|
if-eqz v2, :cond_a
|
|
|
|
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
|
|
|
|
.line 197
|
|
invoke-virtual {v2}, Lokhttp3/internal/connection/RouteSelector$Selection;->getAll()Ljava/util/List;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v4, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
iget-object v10, v1, Lokhttp3/internal/connection/ExchangeFinder;->address:Lokhttp3/Address;
|
|
|
|
iget-object v11, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
|
|
|
|
.line 198
|
|
invoke-virtual {v4, v10, v11, v2, v0}, Lokhttp3/internal/connection/RealConnectionPool;->transmitterAcquirePooledConnection(Lokhttp3/Address;Lokhttp3/internal/connection/Transmitter;Ljava/util/List;Z)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_b
|
|
|
|
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
|
|
|
|
.line 201
|
|
iget-object v7, v0, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
move v9, v8
|
|
|
|
goto :goto_5
|
|
|
|
:catchall_1
|
|
move-exception v0
|
|
|
|
goto/16 :goto_8
|
|
|
|
:cond_a
|
|
move-object v2, v5
|
|
|
|
:cond_b
|
|
:goto_5
|
|
if-nez v9, :cond_d
|
|
|
|
if-nez v6, :cond_c
|
|
|
|
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
|
|
|
|
.line 207
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/RouteSelector$Selection;->next()Lokhttp3/Route;
|
|
|
|
move-result-object v6
|
|
|
|
.line 212
|
|
:cond_c
|
|
new-instance v7, Lokhttp3/internal/connection/RealConnection;
|
|
|
|
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
invoke-direct {v7, v0, v6}, Lokhttp3/internal/connection/RealConnection;-><init>(Lokhttp3/internal/connection/RealConnectionPool;Lokhttp3/Route;)V
|
|
|
|
iput-object v7, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectingConnection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.line 215
|
|
:cond_d
|
|
monitor-exit v3
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
if-eqz v9, :cond_e
|
|
|
|
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->eventListener:Lokhttp3/EventListener;
|
|
|
|
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->call:Lokhttp3/Call;
|
|
|
|
.line 219
|
|
invoke-virtual {v0, v2, v7}, Lokhttp3/EventListener;->connectionAcquired(Lokhttp3/Call;Lokhttp3/Connection;)V
|
|
|
|
return-object v7
|
|
|
|
:cond_e
|
|
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->call:Lokhttp3/Call;
|
|
|
|
iget-object v3, v1, Lokhttp3/internal/connection/ExchangeFinder;->eventListener:Lokhttp3/EventListener;
|
|
|
|
move-object v10, v7
|
|
|
|
move/from16 v11, p1
|
|
|
|
move/from16 v12, p2
|
|
|
|
move/from16 v13, p3
|
|
|
|
move/from16 v14, p4
|
|
|
|
move/from16 v15, p5
|
|
|
|
move-object/from16 v16, v0
|
|
|
|
move-object/from16 v17, v3
|
|
|
|
.line 224
|
|
invoke-virtual/range {v10 .. v17}, Lokhttp3/internal/connection/RealConnection;->connect(IIIIZLokhttp3/Call;Lokhttp3/EventListener;)V
|
|
|
|
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 226
|
|
iget-object v0, v0, Lokhttp3/internal/connection/RealConnectionPool;->routeDatabase:Lokhttp3/internal/connection/RouteDatabase;
|
|
|
|
invoke-virtual {v7}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v0, v3}, Lokhttp3/internal/connection/RouteDatabase;->connected(Lokhttp3/Route;)V
|
|
|
|
iget-object v4, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 229
|
|
monitor-enter v4
|
|
|
|
:try_start_2
|
|
iput-object v5, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectingConnection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
iget-object v3, v1, Lokhttp3/internal/connection/ExchangeFinder;->address:Lokhttp3/Address;
|
|
|
|
iget-object v9, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
|
|
|
|
.line 233
|
|
invoke-virtual {v0, v3, v9, v2, v8}, Lokhttp3/internal/connection/RealConnectionPool;->transmitterAcquirePooledConnection(Lokhttp3/Address;Lokhttp3/internal/connection/Transmitter;Ljava/util/List;Z)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_f
|
|
|
|
.line 235
|
|
iput-boolean v8, v7, Lokhttp3/internal/connection/RealConnection;->noNewExchanges:Z
|
|
|
|
.line 236
|
|
invoke-virtual {v7}, Lokhttp3/internal/connection/RealConnection;->socket()Ljava/net/Socket;
|
|
|
|
move-result-object v5
|
|
|
|
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
|
|
|
|
.line 237
|
|
iget-object v7, v0, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
iput-object v6, v1, Lokhttp3/internal/connection/ExchangeFinder;->nextRouteToTry:Lokhttp3/Route;
|
|
|
|
goto :goto_6
|
|
|
|
:catchall_2
|
|
move-exception v0
|
|
|
|
goto :goto_7
|
|
|
|
:cond_f
|
|
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 243
|
|
invoke-virtual {v0, v7}, Lokhttp3/internal/connection/RealConnectionPool;->put(Lokhttp3/internal/connection/RealConnection;)V
|
|
|
|
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
|
|
|
|
.line 244
|
|
invoke-virtual {v0, v7}, Lokhttp3/internal/connection/Transmitter;->acquireConnectionNoEvents(Lokhttp3/internal/connection/RealConnection;)V
|
|
|
|
.line 246
|
|
:goto_6
|
|
monitor-exit v4
|
|
:try_end_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_2
|
|
|
|
.line 247
|
|
invoke-static {v5}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
|
|
|
|
iget-object v0, v1, Lokhttp3/internal/connection/ExchangeFinder;->eventListener:Lokhttp3/EventListener;
|
|
|
|
iget-object v2, v1, Lokhttp3/internal/connection/ExchangeFinder;->call:Lokhttp3/Call;
|
|
|
|
.line 249
|
|
invoke-virtual {v0, v2, v7}, Lokhttp3/EventListener;->connectionAcquired(Lokhttp3/Call;Lokhttp3/Connection;)V
|
|
|
|
return-object v7
|
|
|
|
.line 246
|
|
:goto_7
|
|
:try_start_3
|
|
monitor-exit v4
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_2
|
|
|
|
throw v0
|
|
|
|
.line 192
|
|
:cond_10
|
|
:try_start_4
|
|
new-instance v0, Ljava/io/IOException;
|
|
|
|
const-string v2, "Canceled"
|
|
|
|
invoke-direct {v0, v2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
.line 215
|
|
:goto_8
|
|
monitor-exit v3
|
|
:try_end_4
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_1
|
|
|
|
throw v0
|
|
|
|
.line 141
|
|
:cond_11
|
|
:try_start_5
|
|
new-instance v0, Ljava/io/IOException;
|
|
|
|
const-string v3, "Canceled"
|
|
|
|
invoke-direct {v0, v3}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
|
|
.line 169
|
|
:goto_9
|
|
monitor-exit v2
|
|
:try_end_5
|
|
.catchall {:try_start_5 .. :try_end_5} :catchall_0
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final findHealthyConnection(IIIIZZ)Lokhttp3/internal/connection/RealConnection;
|
|
.locals 3
|
|
|
|
.line 108
|
|
:goto_0
|
|
invoke-virtual/range {p0 .. p5}, Lokhttp3/internal/connection/ExchangeFinder;->findConnection(IIIIZ)Lokhttp3/internal/connection/RealConnection;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 112
|
|
monitor-enter v1
|
|
|
|
.line 113
|
|
:try_start_0
|
|
iget v2, v0, Lokhttp3/internal/connection/RealConnection;->successCount:I
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/RealConnection;->isMultiplexed()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
.line 114
|
|
monitor-exit v1
|
|
|
|
return-object v0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_1
|
|
|
|
.line 116
|
|
:cond_0
|
|
monitor-exit v1
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 120
|
|
invoke-virtual {v0, p6}, Lokhttp3/internal/connection/RealConnection;->isHealthy(Z)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
.line 121
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/RealConnection;->noNewExchanges()V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return-object v0
|
|
|
|
.line 116
|
|
:goto_1
|
|
:try_start_1
|
|
monitor-exit v1
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public hasRouteToTry()Z
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 274
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
iget-object v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->nextRouteToTry:Lokhttp3/Route;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 276
|
|
monitor-exit v0
|
|
|
|
return v2
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
goto :goto_1
|
|
|
|
.line 278
|
|
:cond_0
|
|
invoke-virtual {p0}, Lokhttp3/internal/connection/ExchangeFinder;->retryCurrentRoute()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
|
|
|
|
.line 280
|
|
iget-object v1, v1, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
invoke-virtual {v1}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route;
|
|
|
|
move-result-object v1
|
|
|
|
iput-object v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->nextRouteToTry:Lokhttp3/Route;
|
|
|
|
.line 281
|
|
monitor-exit v0
|
|
|
|
return v2
|
|
|
|
:cond_1
|
|
iget-object v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
.line 283
|
|
invoke-virtual {v1}, Lokhttp3/internal/connection/RouteSelector$Selection;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_4
|
|
|
|
:cond_2
|
|
iget-object v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->routeSelector:Lokhttp3/internal/connection/RouteSelector;
|
|
|
|
.line 284
|
|
invoke-virtual {v1}, Lokhttp3/internal/connection/RouteSelector;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
const/4 v2, 0x0
|
|
|
|
:cond_4
|
|
:goto_0
|
|
monitor-exit v0
|
|
|
|
return v2
|
|
|
|
.line 285
|
|
:goto_1
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public hasStreamFailure()Z
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 267
|
|
monitor-enter v0
|
|
|
|
:try_start_0
|
|
iget-boolean v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->hasStreamFailure:Z
|
|
|
|
.line 268
|
|
monitor-exit v0
|
|
|
|
return v1
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
.line 269
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public final retryCurrentRoute()Z
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/ExchangeFinder;->transmitter:Lokhttp3/internal/connection/Transmitter;
|
|
|
|
.line 294
|
|
iget-object v0, v0, Lokhttp3/internal/connection/Transmitter;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget v1, v0, Lokhttp3/internal/connection/RealConnection;->routeFailureCount:I
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 296
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->address:Lokhttp3/Address;
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, v1}, Lokhttp3/internal/Util;->sameConnection(Lokhttp3/HttpUrl;Lokhttp3/HttpUrl;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public trackFailure()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/ExchangeFinder;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 260
|
|
monitor-enter v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:try_start_0
|
|
iput-boolean v1, p0, Lokhttp3/internal/connection/ExchangeFinder;->hasStreamFailure:Z
|
|
|
|
.line 262
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|