Skip to content
Snippets Groups Projects
Commit fd2c3787 authored by Andreas Traczyk's avatar Andreas Traczyk Committed by Kateryna Kostiuk
Browse files

notifications: stream HTTP data instead of waiting for response

The proxy-server route /{key} produces a HTTP stream which reflects values obtained by a DHT get. The stream is not guaranteed to signal termination. Previously we were waiting on a complete response which in several scenarios would never arrive. This causes the stream data to not be parsed, and for the URLSession block until a timeout, which would cause queueing of any incoming notifications.

This commit changes the design to stream the HTTP content and handle lines (JSON) asynchronously as they are received.

Gitlab: #359
Change-Id: I469bdde0a3c1ad9d0ac46285740c0f55fd377018
parent 1dea47fc
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment