Skip to content

Commit 91c8312

Browse files
authored
Socket options leak (#271)
(codebuild job completed successfully but GH doesn't seem to realize it)
1 parent 6dba2a1 commit 91c8312

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
- name: Build ${{ env.PACKAGE_NAME }} + consumers
111111
run: |
112112
java -version
113-
mvn -B test
113+
mvn -B test -Daws.crt.debugnative=true
114114
115115
# check that docs can still build
116116
check-docs:

sdk/greengrass/greengrass-client/src/event-stream-rpc-java/client/software/amazon/awssdk/aws/greengrass/GreengrassCoreIPCClientV2.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,14 +1193,16 @@ public static class Builder {
11931193

11941194
public GreengrassCoreIPCClientV2 build() throws IOException {
11951195
if (client == null) {
1196-
SocketOptions socketOptions = new SocketOptions();
1197-
socketOptions.connectTimeoutMs = 3000;
1198-
socketOptions.domain = this.socketDomain;
1199-
socketOptions.type = SocketOptions.SocketType.STREAM;
12001196
String ipcServerSocketPath = this.socketPath;
12011197
String authToken = this.authToken;
12021198
try (EventLoopGroup elGroup = new EventLoopGroup(1);
1203-
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, null)) {
1199+
ClientBootstrap clientBootstrap = new ClientBootstrap(elGroup, null);
1200+
SocketOptions socketOptions = new SocketOptions()) {
1201+
1202+
socketOptions.connectTimeoutMs = 3000;
1203+
socketOptions.domain = this.socketDomain;
1204+
socketOptions.type = SocketOptions.SocketType.STREAM;
1205+
12041206
final EventStreamRPCConnectionConfig config = new EventStreamRPCConnectionConfig(clientBootstrap, elGroup, socketOptions, null, ipcServerSocketPath, this.port, GreengrassConnectMessageSupplier.connectMessageSupplier(authToken));
12051207
connection = new EventStreamRPCConnection(config);
12061208
CompletableFuture<Void> connected = new CompletableFuture<>();

sdk/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<dependency>
4343
<groupId>software.amazon.awssdk.crt</groupId>
4444
<artifactId>aws-crt</artifactId>
45-
<version>0.16.4</version>
45+
<version>0.16.6</version>
4646
</dependency>
4747
<dependency>
4848
<groupId>org.slf4j</groupId>

0 commit comments

Comments
 (0)