Adds a instruction to prevent automatically reconnecting the client to the server
This commit is contained in:
parent
4de135284f
commit
043010aad3
2 changed files with 4 additions and 3 deletions
|
@ -91,7 +91,7 @@ class PacketClient {
|
|||
/// Tries to send a packet to the connected server
|
||||
///
|
||||
/// On success, returns either, the decoded [S2CResponse], or on error a S2CResponse containing an error and a stacktrace as [StringTag]
|
||||
Future<S2CResponse> send(IPacket packet) async {
|
||||
Future<S2CResponse> send(IPacket packet, bool shouldReconnect) async {
|
||||
if (!connected) {
|
||||
return S2CResponse();
|
||||
}
|
||||
|
@ -121,6 +121,7 @@ class PacketClient {
|
|||
|
||||
await onCompletion.future;
|
||||
await close();
|
||||
|
||||
await startConnect(lastIP);
|
||||
S2CResponse reply = S2CResponse();
|
||||
try {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue