Skip to content

Commit 0bd5356

Browse files
committed
add a try for the onSetSSLParamters for devices that do have access to the api
1 parent 8b65869 commit 0bd5356

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/main/java/com/pusher/client/connection/websocket/WebSocketClientWrapper.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,10 @@ public void removeWebSocketListener() {
9494
@Override
9595
protected void onSetSSLParameters(SSLParameters sslParameters) {
9696
// https://github.com/TooTallNate/Java-WebSocket/wiki/No-such-method-error-setEndpointIdentificationAlgorithm
97+
try {
98+
super.onSetSSLParameters(sslParameters);
99+
} catch (NoSuchMethodError error) {
100+
// if this is being called on an android device pre-24 this api isn't available
101+
}
97102
}
98103
}

0 commit comments

Comments
 (0)