Backporting cling error protection from android:
https://github.com/frostwire/frostwire-android/commit/43dccf344cfb6382d7fde4df9933aaa881da104e#src/core/org/fourthline/cling