mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
parent
53bd56100f
commit
aee09d9f52
2 changed files with 2 additions and 0 deletions
|
|
@ -804,6 +804,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
{
|
||||
string version = "";
|
||||
TcpClient tcp = ProxyHandler.newTcpClient(host, port);
|
||||
tcp.ReceiveTimeout = 30000; // 30 seconds
|
||||
tcp.ReceiveTimeout = 5000; //MC 1.7.2+ SpigotMC servers won't respond, so we need a reasonable timeout.
|
||||
byte[] ping = new byte[2] { 0xfe, 0x01 };
|
||||
tcp.Client.Send(ping, SocketFlags.None);
|
||||
|
|
|
|||
|
|
@ -1338,6 +1338,7 @@ namespace MinecraftClient.Protocol.Handlers
|
|||
{
|
||||
string version = "";
|
||||
TcpClient tcp = ProxyHandler.newTcpClient(host, port);
|
||||
tcp.ReceiveTimeout = 30000; // 30 seconds
|
||||
tcp.ReceiveBufferSize = 1024 * 1024;
|
||||
SocketWrapper socketWrapper = new SocketWrapper(tcp);
|
||||
DataTypes dataTypes = new DataTypes(MC18Version);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue