Network Timeout problem

Hello,

In my app I need to make data exchange with server in background each 10 sec. App should work without delays

I use network.request. But when internet connection is slow or unstable I have problems

If I set timeout = 6 then exchange works normally, but sometimes app hang-ups on this timeout and users complains

If I set timeout = 0 then seems no hang-ups, but exchange works unstable

I can not make this exchange in separate thread. Can somebody advise me what is the best solution? Thanks