You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
174 lines
4.2 KiB
174 lines
4.2 KiB
.class final Lokio/Okio$3; |
|
.super Lokio/AsyncTimeout; |
|
.source "Okio.java" |
|
|
|
|
|
# annotations |
|
.annotation system Ldalvik/annotation/EnclosingMethod; |
|
value = Lokio/Okio;->timeout(Ljava/net/Socket;)Lokio/AsyncTimeout; |
|
.end annotation |
|
|
|
.annotation system Ldalvik/annotation/InnerClass; |
|
accessFlags = 0x8 |
|
name = null |
|
.end annotation |
|
|
|
|
|
# instance fields |
|
.field final synthetic val$socket:Ljava/net/Socket; |
|
|
|
|
|
# direct methods |
|
.method constructor <init>(Ljava/net/Socket;)V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 205 |
|
iput-object p1, p0, Lokio/Okio$3;->val$socket:Ljava/net/Socket; |
|
|
|
invoke-direct {p0}, Lokio/AsyncTimeout;-><init>()V |
|
|
|
return-void |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method protected newTimeoutException(Ljava/io/IOException;)Ljava/io/IOException; |
|
.locals 2 |
|
|
|
.prologue |
|
.line 207 |
|
new-instance v0, Ljava/net/SocketTimeoutException; |
|
|
|
const-string v1, "timeout" |
|
|
|
invoke-direct {v0, v1}, Ljava/net/SocketTimeoutException;-><init>(Ljava/lang/String;)V |
|
|
|
.line 208 |
|
if-eqz p1, :cond_0 |
|
|
|
.line 209 |
|
invoke-virtual {v0, p1}, Ljava/io/InterruptedIOException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable; |
|
|
|
.line 211 |
|
:cond_0 |
|
return-object v0 |
|
.end method |
|
|
|
.method protected timedOut()V |
|
.locals 5 |
|
|
|
.prologue |
|
.line 216 |
|
:try_start_0 |
|
iget-object v0, p0, Lokio/Okio$3;->val$socket:Ljava/net/Socket; |
|
|
|
invoke-virtual {v0}, Ljava/net/Socket;->close()V |
|
:try_end_0 |
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0 |
|
.catch Ljava/lang/AssertionError; {:try_start_0 .. :try_end_0} :catch_1 |
|
|
|
.line 229 |
|
:goto_0 |
|
return-void |
|
|
|
.line 217 |
|
:catch_0 |
|
move-exception v0 |
|
|
|
.line 218 |
|
invoke-static {}, Lokio/Okio;->access$000()Ljava/util/logging/Logger; |
|
|
|
move-result-object v1 |
|
|
|
sget-object v2, Ljava/util/logging/Level;->WARNING:Ljava/util/logging/Level; |
|
|
|
new-instance v3, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v4, "Failed to close timed out socket " |
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v3 |
|
|
|
iget-object v4, p0, Lokio/Okio$3;->val$socket:Ljava/net/Socket; |
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v3 |
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v3 |
|
|
|
invoke-virtual {v1, v2, v3, v0}, Ljava/util/logging/Logger;->log(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V |
|
|
|
goto :goto_0 |
|
|
|
.line 219 |
|
:catch_1 |
|
move-exception v0 |
|
|
|
.line 220 |
|
invoke-virtual {v0}, Ljava/lang/AssertionError;->getCause()Ljava/lang/Throwable; |
|
|
|
move-result-object v1 |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
invoke-virtual {v0}, Ljava/lang/AssertionError;->getMessage()Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
.line 221 |
|
invoke-virtual {v0}, Ljava/lang/AssertionError;->getMessage()Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
const-string v2, "getsockname failed" |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z |
|
|
|
move-result v1 |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
.line 224 |
|
invoke-static {}, Lokio/Okio;->access$000()Ljava/util/logging/Logger; |
|
|
|
move-result-object v1 |
|
|
|
sget-object v2, Ljava/util/logging/Level;->WARNING:Ljava/util/logging/Level; |
|
|
|
new-instance v3, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v4, "Failed to close timed out socket " |
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v3 |
|
|
|
iget-object v4, p0, Lokio/Okio$3;->val$socket:Ljava/net/Socket; |
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v3 |
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; |
|
|
|
move-result-object v3 |
|
|
|
invoke-virtual {v1, v2, v3, v0}, Ljava/util/logging/Logger;->log(Ljava/util/logging/Level;Ljava/lang/String;Ljava/lang/Throwable;)V |
|
|
|
goto :goto_0 |
|
|
|
.line 226 |
|
:cond_0 |
|
throw v0 |
|
.end method
|
|
|