Skip to content

Commit

Permalink
Socket options leak (#271)
Browse files Browse the repository at this point in the history
(codebuild job completed successfully but GH doesn't seem to realize it)
  • Loading branch information
bretambrose authored May 3, 2022
1 parent 6dba2a1 commit 91c8312
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ jobs:
- name: Build ${{ env.PACKAGE_NAME }} + consumers
run: |
java -version
mvn -B test
mvn -B test -Daws.crt.debugnative=true
# check that docs can still build
check-docs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1193,14 +1193,16 @@ public static class Builder {

public GreengrassCoreIPCClientV2 build() throws IOException {
if (client == null) {
SocketOptions socketOptions = new SocketOptions();
socketOptions.connectTimeoutMs = 3000;
socketOptions.domain = this.socketDomain;
socketOptions.type = SocketOptions.SocketType.STREAM;
String ipcServerSocketPath = this.socketPath;
String authToken = this.authToken;
try (EventLoopGroup elGroup = new EventLoopGroup(1);
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, null)) {
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, null);
SocketOptions socketOptions = new SocketOptions()) {

socketOptions.connectTimeoutMs = 3000;
socketOptions.domain = this.socketDomain;
socketOptions.type = SocketOptions.SocketType.STREAM;

final EventStreamRPCConnectionConfig config = new EventStreamRPCConnectionConfig(clientBootstrap, elGroup, socketOptions, null, ipcServerSocketPath, this.port, GreengrassConnectMessageSupplier.connectMessageSupplier(authToken));
connection = new EventStreamRPCConnection(config);
CompletableFuture<Void> connected = new CompletableFuture<>();
Expand Down
2 changes: 1 addition & 1 deletion sdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<dependency>
<groupId>software.amazon.awssdk.crt</groupId>
<artifactId>aws-crt</artifactId>
<version>0.16.4</version>
<version>0.16.6</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down

0 comments on commit 91c8312

Please sign in to comment.