Skip to content

Commit d4b9043

Browse files
committed
Fix NPE on disconnect
1 parent c17b197 commit d4b9043

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ class OkHttpConnectionProvider extends AbstractConnectionProvider {
3737
@NonNull
3838
@Override
3939
public void rawDisconnect() {
40-
openedSocked.close(1000, "");
40+
if (openedSocked != null) {
41+
openedSocked.close(1000, "");
42+
}
4143
}
4244

4345
@Override

0 commit comments

Comments
 (0)