@@ -61,7 +61,7 @@ protected WebSocketClientHandler(
6161 clientFactory );
6262 }
6363
64- WebSocketClientHandler (
64+ public WebSocketClientHandler (
6565 @ NonNull String relayName ,
6666 @ NonNull RelayUri relayUri ,
6767 @ NonNull SpringWebSocketClient eventClient ,
@@ -153,6 +153,7 @@ private AutoCloseable openSubscription(
153153 "Subscription closed by relay %s for id %s"
154154 .formatted (relayName , subscriptionId .value ()))));
155155 } catch (IOException e ) {
156+ errorListener .accept (e );
156157 throw new RuntimeException ("Failed to establish subscription" , e );
157158 }
158159 }
@@ -180,9 +181,9 @@ public void close() throws IOException {
180181 AutoCloseable closeFrameHandle = openCloseFrame (subscriptionId , accumulator );
181182 closeQuietly (closeFrameHandle , accumulator );
182183 closeQuietly (delegate , accumulator );
184+ closeQuietly (client , accumulator );
183185
184186 requestClientMap .remove (subscriptionId );
185- closeQuietly (client , accumulator );
186187 accumulator .rethrowIfNecessary ();
187188 }
188189
0 commit comments