Skip to content

Commit 4b392f3

Browse files
GuilhermeJGuilhermeJ
authored andcommitted
Better encapsulation of completable
1 parent 9c3d7ff commit 4b392f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/src/main/java/ua/naiksoftware/stomp/OkHttpConnectionProvider.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public void rawDisconnect() {
4747
if (openedSocked != null) {
4848
openedSocked.close(1000, "");
4949
if (currentListener != null)
50-
currentListener.getCompletable().blockingAwait();
50+
currentListener.awaitCloseBlocking();
5151
}
5252
}
5353

@@ -144,8 +144,8 @@ public void subscribe(CompletableEmitter emitter) {
144144
mEmitters.add(emitter);
145145
}
146146

147-
private Completable getCompletable(){
148-
return mCompletable;
147+
private void awaitCloseBlocking(){
148+
mCompletable.blockingAwait();
149149
}
150150

151151
private void launchCloseEvent(){

0 commit comments

Comments
 (0)