Skip to content

feat: Configurable Connect/Read Timeouts - #55

Merged
tylerjroach merged 2 commits into
masterfrom
feat/configurable-timeouts
Dec 4, 2025
Merged

tylerjroach merged 2 commits into
masterfrom
feat/configurable-timeouts

Conversation

@tylerjroach

Copy link
Copy Markdown
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();

@jaredmixpanel jaredmixpanel left a comment

Copy link
Copy Markdown
Contributor

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.

2 participants