1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420 |
- .class public final Lokhttp3/internal/connection/StreamAllocation;
- .super Ljava/lang/Object;
- .source ""
- # annotations
- .annotation system Ldalvik/annotation/MemberClasses;
- value = {
- Lokhttp3/internal/connection/StreamAllocation$StreamAllocationReference;
- }
- .end annotation
- # static fields
- .field static final synthetic $assertionsDisabled:Z
- # instance fields
- .field public final address:Lokhttp3/Address;
- .field public final call:Lokhttp3/Call;
- .field private final callStackTrace:Ljava/lang/Object;
- .field private canceled:Z
- .field private codec:Lokhttp3/internal/http/HttpCodec;
- .field private connection:Lokhttp3/internal/connection/RealConnection;
- .field private final connectionPool:Lokhttp3/ConnectionPool;
- .field public final eventListener:Lokhttp3/EventListener;
- .field private refusedStreamCount:I
- .field private released:Z
- .field private reportedAcquired:Z
- .field private route:Lokhttp3/Route;
- .field private routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
- .field private final routeSelector:Lokhttp3/internal/connection/RouteSelector;
- # direct methods
- .method static constructor <clinit>()V
- .locals 0
- return-void
- .end method
- .method public constructor <init>(Lokhttp3/ConnectionPool;Lokhttp3/Address;Lokhttp3/Call;Lokhttp3/EventListener;Ljava/lang/Object;)V
- .locals 1
- invoke-direct {p0}, Ljava/lang/Object;-><init>()V
- iput-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- iput-object p2, p0, Lokhttp3/internal/connection/StreamAllocation;->address:Lokhttp3/Address;
- iput-object p3, p0, Lokhttp3/internal/connection/StreamAllocation;->call:Lokhttp3/Call;
- iput-object p4, p0, Lokhttp3/internal/connection/StreamAllocation;->eventListener:Lokhttp3/EventListener;
- new-instance p1, Lokhttp3/internal/connection/RouteSelector;
- invoke-direct {p0}, Lokhttp3/internal/connection/StreamAllocation;->routeDatabase()Lokhttp3/internal/connection/RouteDatabase;
- move-result-object v0
- invoke-direct {p1, p2, v0, p3, p4}, Lokhttp3/internal/connection/RouteSelector;-><init>(Lokhttp3/Address;Lokhttp3/internal/connection/RouteDatabase;Lokhttp3/Call;Lokhttp3/EventListener;)V
- iput-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->routeSelector:Lokhttp3/internal/connection/RouteSelector;
- iput-object p5, p0, Lokhttp3/internal/connection/StreamAllocation;->callStackTrace:Ljava/lang/Object;
- return-void
- .end method
- .method private deallocate(ZZZ)Ljava/net/Socket;
- .locals 1
- const/4 v0, 0x0
- if-eqz p3, :cond_0
- iput-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->codec:Lokhttp3/internal/http/HttpCodec;
- :cond_0
- const/4 p3, 0x1
- if-eqz p2, :cond_1
- iput-boolean p3, p0, Lokhttp3/internal/connection/StreamAllocation;->released:Z
- :cond_1
- iget-object p2, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- if-eqz p2, :cond_5
- if-eqz p1, :cond_2
- iput-boolean p3, p2, Lokhttp3/internal/connection/RealConnection;->noNewStreams:Z
- :cond_2
- iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->codec:Lokhttp3/internal/http/HttpCodec;
- if-nez p1, :cond_5
- iget-boolean p1, p0, Lokhttp3/internal/connection/StreamAllocation;->released:Z
- if-nez p1, :cond_3
- iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- iget-boolean p1, p1, Lokhttp3/internal/connection/RealConnection;->noNewStreams:Z
- if-eqz p1, :cond_5
- :cond_3
- iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- invoke-direct {p0, p1}, Lokhttp3/internal/connection/StreamAllocation;->release(Lokhttp3/internal/connection/RealConnection;)V
- iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- iget-object p1, p1, Lokhttp3/internal/connection/RealConnection;->allocations:Ljava/util/List;
- invoke-interface {p1}, Ljava/util/List;->isEmpty()Z
- move-result p1
- if-eqz p1, :cond_4
- iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- invoke-static {}, Ljava/lang/System;->nanoTime()J
- move-result-wide p2
- iput-wide p2, p1, Lokhttp3/internal/connection/RealConnection;->idleAtNanos:J
- sget-object p1, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
- iget-object p2, p0, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- iget-object p3, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- invoke-virtual {p1, p2, p3}, Lokhttp3/internal/Internal;->connectionBecameIdle(Lokhttp3/ConnectionPool;Lokhttp3/internal/connection/RealConnection;)Z
- move-result p1
- if-eqz p1, :cond_4
- iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- invoke-virtual {p1}, Lokhttp3/internal/connection/RealConnection;->socket()Ljava/net/Socket;
- move-result-object p1
- goto :goto_0
- :cond_4
- move-object p1, v0
- :goto_0
- iput-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- goto :goto_1
- :cond_5
- move-object p1, v0
- :goto_1
- return-object p1
- .end method
- .method private findConnection(IIIZ)Lokhttp3/internal/connection/RealConnection;
- .locals 17
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- move-object/from16 v1, p0
- iget-object v2, v1, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- monitor-enter v2
- :try_start_0
- iget-boolean v0, v1, Lokhttp3/internal/connection/StreamAllocation;->released:Z
- if-nez v0, :cond_12
- iget-object v0, v1, Lokhttp3/internal/connection/StreamAllocation;->codec:Lokhttp3/internal/http/HttpCodec;
- if-nez v0, :cond_11
- iget-boolean v0, v1, Lokhttp3/internal/connection/StreamAllocation;->canceled:Z
- if-nez v0, :cond_10
- iget-object v0, v1, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- invoke-direct/range {p0 .. p0}, Lokhttp3/internal/connection/StreamAllocation;->releaseIfNoNewStreams()Ljava/net/Socket;
- move-result-object v3
- iget-object v4, v1, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- const/4 v5, 0x0
- if-eqz v4, :cond_0
- iget-object v0, v1, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- move-object v4, v5
- goto :goto_0
- :cond_0
- move-object v4, v0
- move-object v0, v5
- :goto_0
- iget-boolean v6, v1, Lokhttp3/internal/connection/StreamAllocation;->reportedAcquired:Z
- if-nez v6, :cond_1
- move-object v4, v5
- :cond_1
- const/4 v6, 0x1
- const/4 v7, 0x0
- if-nez v0, :cond_3
- sget-object v8, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
- iget-object v9, v1, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- iget-object v10, v1, Lokhttp3/internal/connection/StreamAllocation;->address:Lokhttp3/Address;
- invoke-virtual {v8, v9, v10, v1, v5}, Lokhttp3/internal/Internal;->get(Lokhttp3/ConnectionPool;Lokhttp3/Address;Lokhttp3/internal/connection/StreamAllocation;Lokhttp3/Route;)Lokhttp3/internal/connection/RealConnection;
- iget-object v8, v1, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- if-eqz v8, :cond_2
- iget-object v0, v1, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- move-object v8, v0
- move-object v9, v5
- const/4 v0, 0x1
- goto :goto_2
- :cond_2
- iget-object v8, v1, Lokhttp3/internal/connection/StreamAllocation;->route:Lokhttp3/Route;
- move-object v9, v8
- move-object v8, v0
- goto :goto_1
- :cond_3
- move-object v8, v0
- move-object v9, v5
- :goto_1
- const/4 v0, 0x0
- :goto_2
- monitor-exit v2
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_2
- invoke-static {v3}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
- if-eqz v4, :cond_4
- iget-object v2, v1, Lokhttp3/internal/connection/StreamAllocation;->eventListener:Lokhttp3/EventListener;
- iget-object v3, v1, Lokhttp3/internal/connection/StreamAllocation;->call:Lokhttp3/Call;
- invoke-virtual {v2, v3, v4}, Lokhttp3/EventListener;->connectionReleased(Lokhttp3/Call;Lokhttp3/Connection;)V
- :cond_4
- if-eqz v0, :cond_5
- iget-object v2, v1, Lokhttp3/internal/connection/StreamAllocation;->eventListener:Lokhttp3/EventListener;
- iget-object v3, v1, Lokhttp3/internal/connection/StreamAllocation;->call:Lokhttp3/Call;
- invoke-virtual {v2, v3, v8}, Lokhttp3/EventListener;->connectionAcquired(Lokhttp3/Call;Lokhttp3/Connection;)V
- :cond_5
- if-eqz v8, :cond_6
- return-object v8
- :cond_6
- if-nez v9, :cond_8
- iget-object v2, v1, Lokhttp3/internal/connection/StreamAllocation;->routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
- if-eqz v2, :cond_7
- invoke-virtual {v2}, Lokhttp3/internal/connection/RouteSelector$Selection;->hasNext()Z
- move-result v2
- if-nez v2, :cond_8
- :cond_7
- iget-object v2, v1, Lokhttp3/internal/connection/StreamAllocation;->routeSelector:Lokhttp3/internal/connection/RouteSelector;
- invoke-virtual {v2}, Lokhttp3/internal/connection/RouteSelector;->next()Lokhttp3/internal/connection/RouteSelector$Selection;
- move-result-object v2
- iput-object v2, v1, Lokhttp3/internal/connection/StreamAllocation;->routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
- const/4 v2, 0x1
- goto :goto_3
- :cond_8
- const/4 v2, 0x0
- :goto_3
- iget-object v3, v1, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- monitor-enter v3
- :try_start_1
- iget-boolean v4, v1, Lokhttp3/internal/connection/StreamAllocation;->canceled:Z
- if-nez v4, :cond_f
- if-eqz v2, :cond_a
- iget-object v2, v1, Lokhttp3/internal/connection/StreamAllocation;->routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
- invoke-virtual {v2}, Lokhttp3/internal/connection/RouteSelector$Selection;->getAll()Ljava/util/List;
- move-result-object v2
- invoke-interface {v2}, Ljava/util/List;->size()I
- move-result v4
- const/4 v10, 0x0
- :goto_4
- if-ge v10, v4, :cond_a
- invoke-interface {v2, v10}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v11
- check-cast v11, Lokhttp3/Route;
- sget-object v12, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
- iget-object v13, v1, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- iget-object v14, v1, Lokhttp3/internal/connection/StreamAllocation;->address:Lokhttp3/Address;
- invoke-virtual {v12, v13, v14, v1, v11}, Lokhttp3/internal/Internal;->get(Lokhttp3/ConnectionPool;Lokhttp3/Address;Lokhttp3/internal/connection/StreamAllocation;Lokhttp3/Route;)Lokhttp3/internal/connection/RealConnection;
- iget-object v12, v1, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- if-eqz v12, :cond_9
- iget-object v8, v1, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- iput-object v11, v1, Lokhttp3/internal/connection/StreamAllocation;->route:Lokhttp3/Route;
- const/4 v0, 0x1
- goto :goto_5
- :cond_9
- add-int/lit8 v10, v10, 0x1
- goto :goto_4
- :cond_a
- :goto_5
- if-nez v0, :cond_c
- if-nez v9, :cond_b
- iget-object v2, v1, Lokhttp3/internal/connection/StreamAllocation;->routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
- invoke-virtual {v2}, Lokhttp3/internal/connection/RouteSelector$Selection;->next()Lokhttp3/Route;
- move-result-object v9
- :cond_b
- iput-object v9, v1, Lokhttp3/internal/connection/StreamAllocation;->route:Lokhttp3/Route;
- iput v7, v1, Lokhttp3/internal/connection/StreamAllocation;->refusedStreamCount:I
- new-instance v8, Lokhttp3/internal/connection/RealConnection;
- iget-object v2, v1, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- invoke-direct {v8, v2, v9}, Lokhttp3/internal/connection/RealConnection;-><init>(Lokhttp3/ConnectionPool;Lokhttp3/Route;)V
- invoke-virtual {v1, v8, v7}, Lokhttp3/internal/connection/StreamAllocation;->acquire(Lokhttp3/internal/connection/RealConnection;Z)V
- :cond_c
- monitor-exit v3
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_1
- if-eqz v0, :cond_d
- :goto_6
- iget-object v0, v1, Lokhttp3/internal/connection/StreamAllocation;->eventListener:Lokhttp3/EventListener;
- iget-object v2, v1, Lokhttp3/internal/connection/StreamAllocation;->call:Lokhttp3/Call;
- invoke-virtual {v0, v2, v8}, Lokhttp3/EventListener;->connectionAcquired(Lokhttp3/Call;Lokhttp3/Connection;)V
- return-object v8
- :cond_d
- iget-object v15, v1, Lokhttp3/internal/connection/StreamAllocation;->call:Lokhttp3/Call;
- iget-object v0, v1, Lokhttp3/internal/connection/StreamAllocation;->eventListener:Lokhttp3/EventListener;
- move-object v10, v8
- move/from16 v11, p1
- move/from16 v12, p2
- move/from16 v13, p3
- move/from16 v14, p4
- move-object/from16 v16, v0
- invoke-virtual/range {v10 .. v16}, Lokhttp3/internal/connection/RealConnection;->connect(IIIZLokhttp3/Call;Lokhttp3/EventListener;)V
- invoke-direct/range {p0 .. p0}, Lokhttp3/internal/connection/StreamAllocation;->routeDatabase()Lokhttp3/internal/connection/RouteDatabase;
- move-result-object v0
- invoke-virtual {v8}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route;
- move-result-object v2
- invoke-virtual {v0, v2}, Lokhttp3/internal/connection/RouteDatabase;->connected(Lokhttp3/Route;)V
- iget-object v2, v1, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- monitor-enter v2
- :try_start_2
- iput-boolean v6, v1, Lokhttp3/internal/connection/StreamAllocation;->reportedAcquired:Z
- sget-object v0, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
- iget-object v3, v1, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- invoke-virtual {v0, v3, v8}, Lokhttp3/internal/Internal;->put(Lokhttp3/ConnectionPool;Lokhttp3/internal/connection/RealConnection;)V
- invoke-virtual {v8}, Lokhttp3/internal/connection/RealConnection;->isMultiplexed()Z
- move-result v0
- if-eqz v0, :cond_e
- sget-object v0, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
- iget-object v3, v1, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- iget-object v4, v1, Lokhttp3/internal/connection/StreamAllocation;->address:Lokhttp3/Address;
- invoke-virtual {v0, v3, v4, v1}, Lokhttp3/internal/Internal;->deduplicate(Lokhttp3/ConnectionPool;Lokhttp3/Address;Lokhttp3/internal/connection/StreamAllocation;)Ljava/net/Socket;
- move-result-object v5
- iget-object v8, v1, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- :cond_e
- monitor-exit v2
- :try_end_2
- .catchall {:try_start_2 .. :try_end_2} :catchall_0
- invoke-static {v5}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
- goto :goto_6
- :catchall_0
- move-exception v0
- :try_start_3
- monitor-exit v2
- :try_end_3
- .catchall {:try_start_3 .. :try_end_3} :catchall_0
- throw v0
- :cond_f
- :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
- :catchall_1
- move-exception v0
- monitor-exit v3
- :try_end_4
- .catchall {:try_start_4 .. :try_end_4} :catchall_1
- throw v0
- :cond_10
- :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
- :cond_11
- new-instance v0, Ljava/lang/IllegalStateException;
- const-string v3, "codec != null"
- invoke-direct {v0, v3}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw v0
- :cond_12
- new-instance v0, Ljava/lang/IllegalStateException;
- const-string v3, "released"
- invoke-direct {v0, v3}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw v0
- :catchall_2
- move-exception v0
- monitor-exit v2
- :try_end_5
- .catchall {:try_start_5 .. :try_end_5} :catchall_2
- goto :goto_8
- :goto_7
- throw v0
- :goto_8
- goto :goto_7
- .end method
- .method private findHealthyConnection(IIIZZ)Lokhttp3/internal/connection/RealConnection;
- .locals 3
- .annotation system Ldalvik/annotation/Throws;
- value = {
- Ljava/io/IOException;
- }
- .end annotation
- :goto_0
- invoke-direct {p0, p1, p2, p3, p4}, Lokhttp3/internal/connection/StreamAllocation;->findConnection(IIIZ)Lokhttp3/internal/connection/RealConnection;
- move-result-object v0
- iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- monitor-enter v1
- :try_start_0
- iget v2, v0, Lokhttp3/internal/connection/RealConnection;->successCount:I
- if-nez v2, :cond_0
- monitor-exit v1
- return-object v0
- :cond_0
- monitor-exit v1
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- invoke-virtual {v0, p5}, Lokhttp3/internal/connection/RealConnection;->isHealthy(Z)Z
- move-result v1
- if-nez v1, :cond_1
- invoke-virtual {p0}, Lokhttp3/internal/connection/StreamAllocation;->noNewStreams()V
- goto :goto_0
- :cond_1
- return-object v0
- :catchall_0
- move-exception p1
- :try_start_1
- monitor-exit v1
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- goto :goto_2
- :goto_1
- throw p1
- :goto_2
- goto :goto_1
- .end method
- .method private release(Lokhttp3/internal/connection/RealConnection;)V
- .locals 3
- iget-object v0, p1, Lokhttp3/internal/connection/RealConnection;->allocations:Ljava/util/List;
- invoke-interface {v0}, Ljava/util/List;->size()I
- move-result v0
- const/4 v1, 0x0
- :goto_0
- if-ge v1, v0, :cond_1
- iget-object v2, p1, Lokhttp3/internal/connection/RealConnection;->allocations:Ljava/util/List;
- invoke-interface {v2, v1}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v2
- check-cast v2, Ljava/lang/ref/Reference;
- invoke-virtual {v2}, Ljava/lang/ref/Reference;->get()Ljava/lang/Object;
- move-result-object v2
- if-ne v2, p0, :cond_0
- iget-object p1, p1, Lokhttp3/internal/connection/RealConnection;->allocations:Ljava/util/List;
- invoke-interface {p1, v1}, Ljava/util/List;->remove(I)Ljava/lang/Object;
- return-void
- :cond_0
- add-int/lit8 v1, v1, 0x1
- goto :goto_0
- :cond_1
- new-instance p1, Ljava/lang/IllegalStateException;
- invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
- goto :goto_2
- :goto_1
- throw p1
- :goto_2
- goto :goto_1
- .end method
- .method private releaseIfNoNewStreams()Ljava/net/Socket;
- .locals 2
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- if-eqz v0, :cond_0
- iget-boolean v0, v0, Lokhttp3/internal/connection/RealConnection;->noNewStreams:Z
- if-eqz v0, :cond_0
- const/4 v0, 0x1
- const/4 v1, 0x0
- invoke-direct {p0, v1, v1, v0}, Lokhttp3/internal/connection/StreamAllocation;->deallocate(ZZZ)Ljava/net/Socket;
- move-result-object v0
- return-object v0
- :cond_0
- const/4 v0, 0x0
- return-object v0
- .end method
- .method private routeDatabase()Lokhttp3/internal/connection/RouteDatabase;
- .locals 2
- sget-object v0, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
- iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- invoke-virtual {v0, v1}, Lokhttp3/internal/Internal;->routeDatabase(Lokhttp3/ConnectionPool;)Lokhttp3/internal/connection/RouteDatabase;
- move-result-object v0
- return-object v0
- .end method
- # virtual methods
- .method public acquire(Lokhttp3/internal/connection/RealConnection;Z)V
- .locals 1
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- if-nez v0, :cond_0
- iput-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- iput-boolean p2, p0, Lokhttp3/internal/connection/StreamAllocation;->reportedAcquired:Z
- iget-object p1, p1, Lokhttp3/internal/connection/RealConnection;->allocations:Ljava/util/List;
- new-instance p2, Lokhttp3/internal/connection/StreamAllocation$StreamAllocationReference;
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->callStackTrace:Ljava/lang/Object;
- invoke-direct {p2, p0, v0}, Lokhttp3/internal/connection/StreamAllocation$StreamAllocationReference;-><init>(Lokhttp3/internal/connection/StreamAllocation;Ljava/lang/Object;)V
- invoke-interface {p1, p2}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- return-void
- :cond_0
- new-instance p1, Ljava/lang/IllegalStateException;
- invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
- throw p1
- .end method
- .method public cancel()V
- .locals 3
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- monitor-enter v0
- const/4 v1, 0x1
- :try_start_0
- iput-boolean v1, p0, Lokhttp3/internal/connection/StreamAllocation;->canceled:Z
- iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->codec:Lokhttp3/internal/http/HttpCodec;
- iget-object v2, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- monitor-exit v0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- if-eqz v1, :cond_0
- invoke-interface {v1}, Lokhttp3/internal/http/HttpCodec;->cancel()V
- goto :goto_0
- :cond_0
- if-eqz v2, :cond_1
- invoke-virtual {v2}, Lokhttp3/internal/connection/RealConnection;->cancel()V
- :cond_1
- :goto_0
- return-void
- :catchall_0
- move-exception v1
- :try_start_1
- monitor-exit v0
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- throw v1
- .end method
- .method public codec()Lokhttp3/internal/http/HttpCodec;
- .locals 2
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- monitor-enter v0
- :try_start_0
- iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->codec:Lokhttp3/internal/http/HttpCodec;
- monitor-exit v0
- return-object v1
- :catchall_0
- move-exception v1
- monitor-exit v0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- throw v1
- .end method
- .method public declared-synchronized connection()Lokhttp3/internal/connection/RealConnection;
- .locals 1
- monitor-enter p0
- :try_start_0
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- monitor-exit p0
- return-object v0
- :catchall_0
- move-exception v0
- monitor-exit p0
- throw v0
- .end method
- .method public hasMoreRoutes()Z
- .locals 1
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->route:Lokhttp3/Route;
- if-nez v0, :cond_2
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->routeSelection:Lokhttp3/internal/connection/RouteSelector$Selection;
- if-eqz v0, :cond_0
- invoke-virtual {v0}, Lokhttp3/internal/connection/RouteSelector$Selection;->hasNext()Z
- move-result v0
- if-nez v0, :cond_2
- :cond_0
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->routeSelector:Lokhttp3/internal/connection/RouteSelector;
- invoke-virtual {v0}, Lokhttp3/internal/connection/RouteSelector;->hasNext()Z
- move-result v0
- if-eqz v0, :cond_1
- goto :goto_0
- :cond_1
- const/4 v0, 0x0
- goto :goto_1
- :cond_2
- :goto_0
- const/4 v0, 0x1
- :goto_1
- return v0
- .end method
- .method public newStream(Lokhttp3/OkHttpClient;Lokhttp3/Interceptor$Chain;Z)Lokhttp3/internal/http/HttpCodec;
- .locals 6
- invoke-interface {p2}, Lokhttp3/Interceptor$Chain;->connectTimeoutMillis()I
- move-result v1
- invoke-interface {p2}, Lokhttp3/Interceptor$Chain;->readTimeoutMillis()I
- move-result v2
- invoke-interface {p2}, Lokhttp3/Interceptor$Chain;->writeTimeoutMillis()I
- move-result v3
- invoke-virtual {p1}, Lokhttp3/OkHttpClient;->retryOnConnectionFailure()Z
- move-result v4
- move-object v0, p0
- move v5, p3
- :try_start_0
- invoke-direct/range {v0 .. v5}, Lokhttp3/internal/connection/StreamAllocation;->findHealthyConnection(IIIZZ)Lokhttp3/internal/connection/RealConnection;
- move-result-object p3
- invoke-virtual {p3, p1, p2, p0}, Lokhttp3/internal/connection/RealConnection;->newCodec(Lokhttp3/OkHttpClient;Lokhttp3/Interceptor$Chain;Lokhttp3/internal/connection/StreamAllocation;)Lokhttp3/internal/http/HttpCodec;
- move-result-object p1
- iget-object p2, p0, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- monitor-enter p2
- :try_end_0
- .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
- :try_start_1
- iput-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->codec:Lokhttp3/internal/http/HttpCodec;
- monitor-exit p2
- return-object p1
- :catchall_0
- move-exception p1
- monitor-exit p2
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- :try_start_2
- throw p1
- :try_end_2
- .catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
- :catch_0
- move-exception p1
- new-instance p2, Lokhttp3/internal/connection/RouteException;
- invoke-direct {p2, p1}, Lokhttp3/internal/connection/RouteException;-><init>(Ljava/io/IOException;)V
- throw p2
- .end method
- .method public noNewStreams()V
- .locals 4
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- monitor-enter v0
- :try_start_0
- iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- const/4 v2, 0x1
- const/4 v3, 0x0
- invoke-direct {p0, v2, v3, v3}, Lokhttp3/internal/connection/StreamAllocation;->deallocate(ZZZ)Ljava/net/Socket;
- move-result-object v2
- iget-object v3, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- if-eqz v3, :cond_0
- const/4 v1, 0x0
- :cond_0
- monitor-exit v0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- invoke-static {v2}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
- if-eqz v1, :cond_1
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->eventListener:Lokhttp3/EventListener;
- iget-object v2, p0, Lokhttp3/internal/connection/StreamAllocation;->call:Lokhttp3/Call;
- invoke-virtual {v0, v2, v1}, Lokhttp3/EventListener;->connectionReleased(Lokhttp3/Call;Lokhttp3/Connection;)V
- :cond_1
- return-void
- :catchall_0
- move-exception v1
- :try_start_1
- monitor-exit v0
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- throw v1
- .end method
- .method public release()V
- .locals 4
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- monitor-enter v0
- :try_start_0
- iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- const/4 v2, 0x1
- const/4 v3, 0x0
- invoke-direct {p0, v3, v2, v3}, Lokhttp3/internal/connection/StreamAllocation;->deallocate(ZZZ)Ljava/net/Socket;
- move-result-object v2
- iget-object v3, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- if-eqz v3, :cond_0
- const/4 v1, 0x0
- :cond_0
- monitor-exit v0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- invoke-static {v2}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
- if-eqz v1, :cond_1
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->eventListener:Lokhttp3/EventListener;
- iget-object v2, p0, Lokhttp3/internal/connection/StreamAllocation;->call:Lokhttp3/Call;
- invoke-virtual {v0, v2, v1}, Lokhttp3/EventListener;->connectionReleased(Lokhttp3/Call;Lokhttp3/Connection;)V
- :cond_1
- return-void
- :catchall_0
- move-exception v1
- :try_start_1
- monitor-exit v0
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- throw v1
- .end method
- .method public releaseAndAcquire(Lokhttp3/internal/connection/RealConnection;)Ljava/net/Socket;
- .locals 3
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->codec:Lokhttp3/internal/http/HttpCodec;
- if-nez v0, :cond_0
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- iget-object v0, v0, Lokhttp3/internal/connection/RealConnection;->allocations:Ljava/util/List;
- invoke-interface {v0}, Ljava/util/List;->size()I
- move-result v0
- const/4 v1, 0x1
- if-ne v0, v1, :cond_0
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- iget-object v0, v0, Lokhttp3/internal/connection/RealConnection;->allocations:Ljava/util/List;
- const/4 v2, 0x0
- invoke-interface {v0, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
- move-result-object v0
- check-cast v0, Ljava/lang/ref/Reference;
- invoke-direct {p0, v1, v2, v2}, Lokhttp3/internal/connection/StreamAllocation;->deallocate(ZZZ)Ljava/net/Socket;
- move-result-object v1
- iput-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- iget-object p1, p1, Lokhttp3/internal/connection/RealConnection;->allocations:Ljava/util/List;
- invoke-interface {p1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z
- return-object v1
- :cond_0
- new-instance p1, Ljava/lang/IllegalStateException;
- invoke-direct {p1}, Ljava/lang/IllegalStateException;-><init>()V
- throw p1
- .end method
- .method public streamFailed(Ljava/io/IOException;)V
- .locals 6
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- monitor-enter v0
- :try_start_0
- instance-of v1, p1, Lokhttp3/internal/http2/StreamResetException;
- const/4 v2, 0x0
- const/4 v3, 0x0
- const/4 v4, 0x1
- if-eqz v1, :cond_1
- check-cast p1, Lokhttp3/internal/http2/StreamResetException;
- iget-object v1, p1, Lokhttp3/internal/http2/StreamResetException;->errorCode:Lokhttp3/internal/http2/ErrorCode;
- sget-object v5, Lokhttp3/internal/http2/ErrorCode;->REFUSED_STREAM:Lokhttp3/internal/http2/ErrorCode;
- if-ne v1, v5, :cond_0
- iget v1, p0, Lokhttp3/internal/connection/StreamAllocation;->refusedStreamCount:I
- add-int/2addr v1, v4
- iput v1, p0, Lokhttp3/internal/connection/StreamAllocation;->refusedStreamCount:I
- :cond_0
- iget-object p1, p1, Lokhttp3/internal/http2/StreamResetException;->errorCode:Lokhttp3/internal/http2/ErrorCode;
- sget-object v1, Lokhttp3/internal/http2/ErrorCode;->REFUSED_STREAM:Lokhttp3/internal/http2/ErrorCode;
- if-ne p1, v1, :cond_3
- iget p1, p0, Lokhttp3/internal/connection/StreamAllocation;->refusedStreamCount:I
- if-le p1, v4, :cond_5
- goto :goto_0
- :cond_1
- iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- if-eqz v1, :cond_5
- iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- invoke-virtual {v1}, Lokhttp3/internal/connection/RealConnection;->isMultiplexed()Z
- move-result v1
- if-eqz v1, :cond_2
- instance-of v1, p1, Lokhttp3/internal/http2/ConnectionShutdownException;
- if-eqz v1, :cond_5
- :cond_2
- iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- iget v1, v1, Lokhttp3/internal/connection/RealConnection;->successCount:I
- if-nez v1, :cond_4
- iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->route:Lokhttp3/Route;
- if-eqz v1, :cond_3
- if-eqz p1, :cond_3
- iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->routeSelector:Lokhttp3/internal/connection/RouteSelector;
- iget-object v5, p0, Lokhttp3/internal/connection/StreamAllocation;->route:Lokhttp3/Route;
- invoke-virtual {v1, v5, p1}, Lokhttp3/internal/connection/RouteSelector;->connectFailed(Lokhttp3/Route;Ljava/io/IOException;)V
- :cond_3
- :goto_0
- iput-object v3, p0, Lokhttp3/internal/connection/StreamAllocation;->route:Lokhttp3/Route;
- :cond_4
- const/4 p1, 0x1
- goto :goto_1
- :cond_5
- const/4 p1, 0x0
- :goto_1
- iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- invoke-direct {p0, p1, v2, v4}, Lokhttp3/internal/connection/StreamAllocation;->deallocate(ZZZ)Ljava/net/Socket;
- move-result-object p1
- iget-object v2, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- if-nez v2, :cond_6
- iget-boolean v2, p0, Lokhttp3/internal/connection/StreamAllocation;->reportedAcquired:Z
- if-nez v2, :cond_7
- :cond_6
- move-object v1, v3
- :cond_7
- monitor-exit v0
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- invoke-static {p1}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
- if-eqz v1, :cond_8
- iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->eventListener:Lokhttp3/EventListener;
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->call:Lokhttp3/Call;
- invoke-virtual {p1, v0, v1}, Lokhttp3/EventListener;->connectionReleased(Lokhttp3/Call;Lokhttp3/Connection;)V
- :cond_8
- return-void
- :catchall_0
- move-exception p1
- :try_start_1
- monitor-exit v0
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- throw p1
- .end method
- .method public streamFinished(ZLokhttp3/internal/http/HttpCodec;JLjava/io/IOException;)V
- .locals 2
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->eventListener:Lokhttp3/EventListener;
- iget-object v1, p0, Lokhttp3/internal/connection/StreamAllocation;->call:Lokhttp3/Call;
- invoke-virtual {v0, v1, p3, p4}, Lokhttp3/EventListener;->responseBodyEnd(Lokhttp3/Call;J)V
- iget-object p3, p0, Lokhttp3/internal/connection/StreamAllocation;->connectionPool:Lokhttp3/ConnectionPool;
- monitor-enter p3
- if-eqz p2, :cond_5
- :try_start_0
- iget-object p4, p0, Lokhttp3/internal/connection/StreamAllocation;->codec:Lokhttp3/internal/http/HttpCodec;
- if-ne p2, p4, :cond_5
- const/4 p2, 0x1
- if-nez p1, :cond_0
- iget-object p4, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- iget v0, p4, Lokhttp3/internal/connection/RealConnection;->successCount:I
- add-int/2addr v0, p2
- iput v0, p4, Lokhttp3/internal/connection/RealConnection;->successCount:I
- :cond_0
- iget-object p4, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- const/4 v0, 0x0
- invoke-direct {p0, p1, v0, p2}, Lokhttp3/internal/connection/StreamAllocation;->deallocate(ZZZ)Ljava/net/Socket;
- move-result-object p1
- iget-object p2, p0, Lokhttp3/internal/connection/StreamAllocation;->connection:Lokhttp3/internal/connection/RealConnection;
- if-eqz p2, :cond_1
- const/4 p4, 0x0
- :cond_1
- iget-boolean p2, p0, Lokhttp3/internal/connection/StreamAllocation;->released:Z
- monitor-exit p3
- :try_end_0
- .catchall {:try_start_0 .. :try_end_0} :catchall_0
- invoke-static {p1}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
- if-eqz p4, :cond_2
- iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->eventListener:Lokhttp3/EventListener;
- iget-object p3, p0, Lokhttp3/internal/connection/StreamAllocation;->call:Lokhttp3/Call;
- invoke-virtual {p1, p3, p4}, Lokhttp3/EventListener;->connectionReleased(Lokhttp3/Call;Lokhttp3/Connection;)V
- :cond_2
- if-eqz p5, :cond_3
- iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->eventListener:Lokhttp3/EventListener;
- iget-object p2, p0, Lokhttp3/internal/connection/StreamAllocation;->call:Lokhttp3/Call;
- invoke-virtual {p1, p2, p5}, Lokhttp3/EventListener;->callFailed(Lokhttp3/Call;Ljava/io/IOException;)V
- goto :goto_0
- :cond_3
- if-eqz p2, :cond_4
- iget-object p1, p0, Lokhttp3/internal/connection/StreamAllocation;->eventListener:Lokhttp3/EventListener;
- iget-object p2, p0, Lokhttp3/internal/connection/StreamAllocation;->call:Lokhttp3/Call;
- invoke-virtual {p1, p2}, Lokhttp3/EventListener;->callEnd(Lokhttp3/Call;)V
- :cond_4
- :goto_0
- return-void
- :cond_5
- :try_start_1
- new-instance p1, Ljava/lang/IllegalStateException;
- new-instance p4, Ljava/lang/StringBuilder;
- invoke-direct {p4}, Ljava/lang/StringBuilder;-><init>()V
- const-string p5, "expected "
- invoke-virtual {p4, p5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- iget-object p5, p0, Lokhttp3/internal/connection/StreamAllocation;->codec:Lokhttp3/internal/http/HttpCodec;
- invoke-virtual {p4, p5}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- const-string p5, " but was "
- invoke-virtual {p4, p5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
- invoke-virtual {p4, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
- invoke-virtual {p4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
- move-result-object p2
- invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
- throw p1
- :catchall_0
- move-exception p1
- monitor-exit p3
- :try_end_1
- .catchall {:try_start_1 .. :try_end_1} :catchall_0
- throw p1
- .end method
- .method public toString()Ljava/lang/String;
- .locals 1
- invoke-virtual {p0}, Lokhttp3/internal/connection/StreamAllocation;->connection()Lokhttp3/internal/connection/RealConnection;
- move-result-object v0
- if-eqz v0, :cond_0
- invoke-virtual {v0}, Lokhttp3/internal/connection/RealConnection;->toString()Ljava/lang/String;
- move-result-object v0
- goto :goto_0
- :cond_0
- iget-object v0, p0, Lokhttp3/internal/connection/StreamAllocation;->address:Lokhttp3/Address;
- invoke-virtual {v0}, Lokhttp3/Address;->toString()Ljava/lang/String;
- move-result-object v0
- :goto_0
- return-object v0
- .end method
|