GitHub user Gentrio opened a pull request:

    https://github.com/apache/incubator-weex/pull/1014

    + [android] close #123, websocket operate on main thread

    DefaultWebSocketAdapter will throw an exception when run on android 7.0
    
    
[https://developer.android.com/about/versions/nougat/android-7.0-changes.html](url)
    
    > Due to a bug in previous versions of Android, the system did not flag 
writing to a TCP socket on the main thread as a strict-mode violation. Android 
7.0 fixes this bug. Apps that exhibit this behavior now throw an 
android.os.NetworkOnMainThreadException. Generally, performing network 
operations on the main thread is a bad idea because these operations usually 
have a high tail latency that causes ANRs and jank.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Gentrio/incubator-weex 
android-bugfix-websocket

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-weex/pull/1014.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1014
    
----
commit 431716bfd518baa405d8ed3ec4d8b3e948560b4c
Author: libai <libai@...>
Date:   2018-02-05T09:38:23Z

    + [android] close #123, websocket operate on main thread

----


---

Reply via email to