Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Change default emit timeout from 5 seconds to 30 seconds (#658)
The default timeout for the whole request duration in emitter was set to 5 seconds. This is far from being sufficient on mobile and is a likely cause of the large number of duplicate event reports that we have seen. On slow connections, the request may easily take more than 5 seconds, especially if the phone is switching between cellular and wifi connections.
I have changed it to 30s as we already have a 15s timeout for connection and 15s timeout for read response in the okhttp client config. On iOS, we don't change the default request timeouts which are set to 60 seconds.
Update Emitter constructor to accept namespace and event store and make them immutable
Similar to the change on iOS, this moves the namespace and event store to the constructor of the Emitter. This enables removing some optional and makes the properties immutable and safer.
Fix returning error from network connection requests
This is a fix for a bug that prevented us returning an error value to the emitter when executing a request.
Remove unused threadCount property from Tracker
Minor update that just removes an unused property in the tracker which confused me (there is a similar one in the emitter config).
Set default thread count in Executor to match the default thread pool size in the Emitter
Updates the default thread count in Executor to match the default thread pool size in emitter config. The thread count in Executor is controlled by the thread pool size in the emitter.