Skip to content

Commit 9256979

Browse files
committed
update socket/nativeclient/SocketClient.java ---> close Socket.getInputStream will be close socket
Signed-off-by: mitkey <mitkey@foxmail.com>
1 parent 7e53482 commit 9256979

File tree

1 file changed

+0
-20
lines changed

1 file changed

+0
-20
lines changed

src/main/java/io/socket/nativeclient/SocketClient.java

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -145,22 +145,6 @@ private void transportDisconnected() {
145145
}
146146

147147
// 断开 socket
148-
if (bos != null) {
149-
try {
150-
bos.close();
151-
bos = null;
152-
} catch (IOException e) {
153-
transportError(e);
154-
}
155-
}
156-
if (bis != null) {
157-
try {
158-
bis.close();
159-
bis = null;
160-
} catch (IOException e) {
161-
transportError(e);
162-
}
163-
}
164148
if (socket != null) {
165149
try {
166150
socket.close();
@@ -198,10 +182,6 @@ public void run() {
198182
return;
199183
}
200184
}
201-
try {
202-
sleep(50);
203-
} catch (InterruptedException e) {
204-
}
205185
}
206186
transportDisconnected();
207187
}

0 commit comments

Comments
 (0)