Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
lDEVinux
GitHub Repository: lDEVinux/eaglercraft
Path: blob/main/sp-server/src_aux/TcpMonitorThread.java
8641 views
1
package net.minecraft.src;
2
3
class TcpMonitorThread extends Thread {
4
final TcpConnection theTcpConnection;
5
6
TcpMonitorThread(TcpConnection par1TcpConnection) {
7
this.theTcpConnection = par1TcpConnection;
8
}
9
10
public void run() {
11
try {
12
Thread.sleep(2000L);
13
14
if (TcpConnection.isRunning(this.theTcpConnection)) {
15
TcpConnection.getWriteThread(this.theTcpConnection).interrupt();
16
this.theTcpConnection.networkShutdown("disconnect.closed", new Object[0]);
17
}
18
} catch (Exception var2) {
19
var2.printStackTrace();
20
}
21
}
22
}
23
24