Tencent / VasSonic

VasSonic is a lightweight and high-performance Hybrid framework developed by tencent VAS team, which is intended to speed up the first screen of websites working on Android and iOS platform.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

3.1.0版本调用sonicSession.destroy()报server disconnect error

1079107009 opened this issue · comments

@OverRide
protected void onDestroy() {
super.onDestroy();

    if (sonicSession != null) {
        sonicSession.destroy();
        sonicSession = null;
    }
}

SonicServer

public void disconnect() {

    try {
        BufferedInputStream bufferedInputStream = connectionImpl.getResponseStream();
        if (bufferedInputStream != null) {
            bufferedInputStream.close();
        }
    } catch (Throwable e) {
        SonicUtils.log(TAG, Log.ERROR, "session(" + session.sId + ") server disconnect error:" + e.getMessage() + ".");
    }

    connectionImpl.disconnect();
}

报这个异常android.os.NetworkOnMainThreadException