Skip to content

Commit

Permalink
Controller : add more netty props
Browse files Browse the repository at this point in the history
  • Loading branch information
pquiring committed Jan 6, 2025
1 parent 9355cbe commit a509a28
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/javaforce/controls/Controller.java
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ public boolean connect(String url) {
if (!netty) {
netty = true;
JFLog.log("Disabling netty unsafe usage!");
System.setProperty("io.netty.allocator.numDirectArenas", "0");
System.setProperty("io.netty.noPreferDirect", "true");
System.setProperty("io.netty.noUnsafe", "true");
}
plcType = ControllerType.PLC4J;
Expand All @@ -97,7 +99,9 @@ public boolean connect(String url) {
}
try {
plcConn = PlcDriverManager.getDefault().getConnectionManager().getConnection(url);
JFLog.log("Controller:conn=" + plcConn);
plcDrv = PlcDriverManager.getDefault().getDriver(driver);
JFLog.log("Controller:driver=" + plcDrv);
return true;
} catch (Exception e) {
JFLog.log(e);
Expand Down

0 comments on commit a509a28

Please sign in to comment.