Skip to content

Conversation

@tylerjroach
Copy link
Contributor

Add custom connect and read timeout support

Adds the ability to configure custom connect and read timeouts for network requests via the MixpanelAPI.Builder.

Changes

  • Added connectTimeout(int) and readTimeout(int) methods to MixpanelAPI.Builder
  • Default timeouts remain unchanged (2s connect, 10s read)
  • Setting 0 allows indefinite timeout; negative values are ignored

Usage

MixpanelAPI api = new MixpanelAPI.Builder()
    .connectTimeout(5000)  // 5 seconds
    .readTimeout(30000)    // 30 seconds
    .build();

Copy link
Contributor

@jaredmixpanel jaredmixpanel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@tylerjroach tylerjroach merged commit 00f2e90 into master Dec 4, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants