rsocket-java icon indicating copy to clipboard operation
rsocket-java copied to clipboard

Support close in RSocketClient that notifies of the result

Open rstoyanchev opened this issue 2 years ago • 0 comments

RSocketClient implements Disposable which provides a way to initiate a shutdown. However, there is no good way to hold for the result, and it is important in some cases to wait for that. For example, in components that expose start/stop lifecycle methods and could be started and stopped multiple times. Likewise in tests to ensure resources are released before continuing.

By comparison RSocket implements Closeable so technically possible to access the underlying source RSocket and call close() on that but that could cause a session to be started if not already connected. It would be better to align the two and expose a similar option at the level of RSocketClient as well.

rstoyanchev avatar May 06 '22 09:05 rstoyanchev