You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am using bedrock multi instance and one of my accounts keeps ping timeing out and it randomly stops
What did you try yet?
Did you try any method from the API?
Did you try any example? Any error from those?
Your current code
constbedrock=require('bedrock-protocol');// ConfigurationconstserverHost='donutSMP.net';// The Bedrock server you want to connect toconstserverPort=19132;// The port of the Bedrock server// Define account configurationsconstaccounts=[{username: 'hiqril',},{username: 'raxFR',}];// Function to create a client for a single accountfunctioncreateAndConnectClient(account){// Create a client to connect to the Bedrock serverconstclient=bedrock.createClient({host: serverHost,port: serverPort,username: account.username,offline: false,// Set to true to enable offline mode});// Handle successful connectionclient.on('connect',()=>{console.log(`Connected to server as ${account.username}`);});// Handle the 'spawn' eventclient.on('spawn',()=>{console.log(`${account.username} has spawned on the server.`);});// Handle connection errorsclient.on('error',(error)=>{console.error(`Connection error for ${account.username}:`,error);});// Handle Reconnect errorsclient.on('end',()=>{console.log(`${account.username} disconnected from the server. Reconnecting...`);createAndConnectClient(account);});// Add more event listeners here as needed}// Connect each account to the serverfunctionconnectBothAccounts(){for(constaccountofaccounts){createAndConnectClient(account);}}// Start the connection process for both accountsconnectBothAccounts();
Expected behavior
to both accounts launch and not timeout every few hours
Additional context
when it times out i sometimes have to wait long hours 6+
The text was updated successfully, but these errors were encountered:
This is because the server is unreachable. You need to make sure you can connect with a vanilla client when you get that error. If it works sometimes, it could be an temporary issue with the server.
This is because the server is unreachable. You need to make sure you can connect with a vanilla client when you get that error. If it works sometimes, it could be an temporary issue with the server.
it works fine in java and bedrock its just that it crashes / timeout
Versions
Detailed description of a problem
i am using bedrock multi instance and one of my accounts keeps ping timeing out and it randomly stops
What did you try yet?
Did you try any method from the API?
Did you try any example? Any error from those?
Your current code
Expected behavior
to both accounts launch and not timeout every few hours
Additional context
when it times out i sometimes have to wait long hours 6+
The text was updated successfully, but these errors were encountered: