crossbario / autobahn-java

WebSocket & WAMP in Java for Android and Java 8
https://crossbar.io/autobahn
MIT License
1.52k stars 427 forks source link

Autobahn does not comply with Android Strict Mode #519

Open jschmid opened 3 years ago

jschmid commented 3 years ago

If you try to enable StrictMode, specifically [untagged sockets](https://developer.android.com/reference/android/os/StrictMode.VmPolicy.Builder#detectUntaggedSockets()), the app will trigger warnings (or crash if it is configured as such) because of the socket opened by Autobahn.

This is a bit annoying because this prevents us to use the "catch all" detectAll() method from StrictMode.

From what I understand, WebSocketConnector should call TrafficStats.setThreadStatsTag(int) to use a TAG for the socket created by Autobahn.