Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nostr-java-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@
<dependency>
<groupId>uk.org.lidalia</groupId>
<artifactId>slf4j-test</artifactId>
<version>2.4.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ protected WebSocketClientHandler(
clientFactory);
}

WebSocketClientHandler(
public WebSocketClientHandler(
@NonNull String relayName,
@NonNull RelayUri relayUri,
@NonNull SpringWebSocketClient eventClient,
Expand Down Expand Up @@ -153,6 +153,7 @@ private AutoCloseable openSubscription(
"Subscription closed by relay %s for id %s"
.formatted(relayName, subscriptionId.value()))));
} catch (IOException e) {
errorListener.accept(e);
throw new RuntimeException("Failed to establish subscription", e);
}
}
Expand Down Expand Up @@ -180,9 +181,9 @@ public void close() throws IOException {
AutoCloseable closeFrameHandle = openCloseFrame(subscriptionId, accumulator);
closeQuietly(closeFrameHandle, accumulator);
closeQuietly(delegate, accumulator);
closeQuietly(client, accumulator);

requestClientMap.remove(subscriptionId);
closeQuietly(client, accumulator);
accumulator.rethrowIfNecessary();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,13 @@ public AutoCloseable subscribe(
throws IOException {
Objects.requireNonNull(messageListener, "messageListener");
Objects.requireNonNull(errorListener, "errorListener");
sentPayloads.add(requestJson);
if (!open) {
throw new IOException("WebSocket session is closed for " + relayUrl);
log.debug("Subscription on closed WebSocket for {}, returning no-op handle", relayUrl);
return () -> {}; // No-op handle since client is already closed
}
String id = UUID.randomUUID().toString();
listeners.put(id, new Listener(messageListener, errorListener, closeListener));
sentPayloads.add(requestJson);
return () -> listeners.remove(id);
}

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<groupId>xyz.tcheeric</groupId>
<artifactId>nostr-java</artifactId>
<version>0.6.5-SNAPSHOT</version>
<version>0.6.6-SNAPSHOT</version>
<packaging>pom</packaging>
Comment on lines 4 to 7

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Align module parent versions with root snapshot bump

The root POM now declares version 0.6.6-SNAPSHOT, but every module POM still lists the parent as 0.6.5-SNAPSHOT. When the artifacts are deployed, those child POMs will reference a parent version that no longer exists, which will make downstream builds fail with Non-resolvable parent POM errors. Either revert the version bump or update all module <parent> sections in the same commit.

Useful? React with 👍 / 👎.


<name>${project.artifactId}</name>
Expand Down