summaryrefslogtreecommitdiffstats
path: root/dalvik
diff options
context:
space:
mode:
Diffstat (limited to 'dalvik')
-rw-r--r--dalvik/src/main/java/dalvik/system/SocketTagger.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/dalvik/src/main/java/dalvik/system/SocketTagger.java b/dalvik/src/main/java/dalvik/system/SocketTagger.java
index 0228545..75242ce 100644
--- a/dalvik/src/main/java/dalvik/system/SocketTagger.java
+++ b/dalvik/src/main/java/dalvik/system/SocketTagger.java
@@ -50,11 +50,15 @@ public abstract class SocketTagger {
public abstract void untag(FileDescriptor socketDescriptor) throws SocketException;
public final void tag(Socket socket) throws SocketException {
- tag(socket.getFileDescriptor$());
+ if (!socket.isClosed()) {
+ tag(socket.getFileDescriptor$());
+ }
}
public final void untag(Socket socket) throws SocketException {
- untag(socket.getFileDescriptor$());
+ if (!socket.isClosed()) {
+ untag(socket.getFileDescriptor$());
+ }
}
/**