Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
lDEVinux
GitHub Repository: lDEVinux/eaglercraft
Path: blob/main/sp-server/src_aux/TcpMasterThread.java
8641 views
1
package net.minecraft.src;
2
3
class TcpMasterThread extends Thread {
4
final TcpConnection theTcpConnection;
5
6
TcpMasterThread(TcpConnection par1TcpConnection) {
7
this.theTcpConnection = par1TcpConnection;
8
}
9
10
@SuppressWarnings("deprecation")
11
public void run() {
12
try {
13
Thread.sleep(5000L);
14
15
if (TcpConnection.getReadThread(this.theTcpConnection).isAlive()) {
16
try {
17
TcpConnection.getReadThread(this.theTcpConnection).stop();
18
} catch (Throwable var3) {
19
;
20
}
21
}
22
23
if (TcpConnection.getWriteThread(this.theTcpConnection).isAlive()) {
24
try {
25
TcpConnection.getWriteThread(this.theTcpConnection).stop();
26
} catch (Throwable var2) {
27
;
28
}
29
}
30
} catch (InterruptedException var4) {
31
var4.printStackTrace();
32
}
33
}
34
}
35
36