android-ssdp icon indicating copy to clipboard operation
android-ssdp copied to clipboard

The socket should be set to a specific timeout

Open zefanxu opened this issue 6 years ago • 1 comments

The socket maybe blocking, so a timeout should be set on that socket. Otherwise due to the background thread is running sequentially, the other async task in the same activity will be blocked.

zefanxu avatar Jun 14 '18 08:06 zefanxu

Thanks for the clue... I even didn't know this! Beside what you told I have found another work around: instead of using discover.execute(); I have used discover.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); This way they AsyncTasks won't block each other.

AKTanara avatar Jul 12 '21 22:07 AKTanara