Bug fixes

This commit is contained in:
Finn
2025-12-13 16:47:30 +01:00
parent 6cb9f55804
commit bf978f48b0
3 changed files with 10 additions and 9 deletions

View File

@@ -6,7 +6,7 @@
<groupId>org.openautonomousconnection</groupId> <groupId>org.openautonomousconnection</groupId>
<artifactId>protocol</artifactId> <artifactId>protocol</artifactId>
<version>1.0.0-BETA.5</version> <version>1.0.0-BETA.5.1</version>
<organization> <organization>
<name>Open Autonomous Connection</name> <name>Open Autonomous Connection</name>
<url>https://open-autonomous-connection.org/</url> <url>https://open-autonomous-connection.org/</url>

View File

@@ -105,8 +105,6 @@ public final class ProtocolBridge {
*/ */
@ProtocolInfo(protocolSide = ProtocolVersion.ProtocolSide.INS) @ProtocolInfo(protocolSide = ProtocolVersion.ProtocolSide.INS)
public ProtocolBridge(ProtocolINSServer protocolINSServer, ProtocolSettings protocolSettings, ProtocolVersion protocolVersion, File logFolder) throws Exception { public ProtocolBridge(ProtocolINSServer protocolINSServer, ProtocolSettings protocolSettings, ProtocolVersion protocolVersion, File logFolder) throws Exception {
protocolINSServer.attachBridge(this);
// Assign the parameters to the class fields // Assign the parameters to the class fields
this.protocolINSServer = protocolINSServer; this.protocolINSServer = protocolINSServer;
this.protocolSettings = protocolSettings; this.protocolSettings = protocolSettings;
@@ -119,6 +117,9 @@ public final class ProtocolBridge {
// Register the appropriate listeners and packets // Register the appropriate listeners and packets
registerListeners(); registerListeners();
registerPackets(); registerPackets();
// Assign Bridge
protocolINSServer.attachBridge(this);
} }
/** /**
@@ -132,8 +133,6 @@ public final class ProtocolBridge {
*/ */
@ProtocolInfo(protocolSide = ProtocolVersion.ProtocolSide.WEB) @ProtocolInfo(protocolSide = ProtocolVersion.ProtocolSide.WEB)
public ProtocolBridge(ProtocolWebServer protocolWebServer, ProtocolSettings protocolSettings, ProtocolVersion protocolVersion, File logFolder) throws Exception { public ProtocolBridge(ProtocolWebServer protocolWebServer, ProtocolSettings protocolSettings, ProtocolVersion protocolVersion, File logFolder) throws Exception {
protocolWebServer.attachBridge(this);
// Assign the parameters to the class fields // Assign the parameters to the class fields
this.protocolWebServer = protocolWebServer; this.protocolWebServer = protocolWebServer;
this.protocolSettings = protocolSettings; this.protocolSettings = protocolSettings;
@@ -146,6 +145,9 @@ public final class ProtocolBridge {
// Register the appropriate listeners and packets // Register the appropriate listeners and packets
registerListeners(); registerListeners();
registerPackets(); registerPackets();
// Assign Bridge
protocolINSServer.attachBridge(this);
} }
/** /**
@@ -159,8 +161,6 @@ public final class ProtocolBridge {
*/ */
@ProtocolInfo(protocolSide = ProtocolVersion.ProtocolSide.CLIENT) @ProtocolInfo(protocolSide = ProtocolVersion.ProtocolSide.CLIENT)
public ProtocolBridge(ProtocolClient protocolClient, ProtocolSettings protocolSettings, ProtocolVersion protocolVersion, File logFolder) throws Exception { public ProtocolBridge(ProtocolClient protocolClient, ProtocolSettings protocolSettings, ProtocolVersion protocolVersion, File logFolder) throws Exception {
protocolClient.attachBridge(this);
// Assign the parameters to the class fields // Assign the parameters to the class fields
this.protocolClient = protocolClient; this.protocolClient = protocolClient;
this.protocolSettings = protocolSettings; this.protocolSettings = protocolSettings;
@@ -173,6 +173,9 @@ public final class ProtocolBridge {
// Register the appropriate listeners and packets // Register the appropriate listeners and packets
registerListeners(); registerListeners();
registerPackets(); registerPackets();
// Assign Bridge
protocolINSServer.attachBridge(this);
} }
/** /**

View File

@@ -86,8 +86,6 @@ public abstract class ProtocolINSServer extends DefaultMethodsOverrider {
checkFileExists(folderStructure.publicServerFolder, folderStructure.certPrefix, ".crt"); checkFileExists(folderStructure.publicServerFolder, folderStructure.certPrefix, ".crt");
checkFileExists(folderStructure.privateServerFolder, folderStructure.certPrefix, ".key"); checkFileExists(folderStructure.privateServerFolder, folderStructure.certPrefix, ".key");
// Initialize the protocol bridge and clients list // Initialize the protocol bridge and clients list
this.clients = new ArrayList<>(); this.clients = new ArrayList<>();