Skip to content

connectTimeout of 1s is too short for Tailscale Funnel (TLS handshake ~2s) #230

Description

@gehbfarr5

Problem

The connectTimeout in NetworkModule.kt is set to 1 second:

.connectTimeout(1, TimeUnit.SECONDS)

However, in OkHttp, connectTimeout covers both TCP connection and TLS handshake. When accessing TeslamateApi via Tailscale Funnel (HTTPS), the TLS handshake takes ~2 seconds:

tcp_connect: 0.005s
ssl_handshake: 2.025s  ← exceeds 1s timeout
total: 2.57s

This causes the app to silently fail to connect — no error is shown, it just doesn't load.

Steps to reproduce

  1. Deploy TeslamateApi behind Tailscale Funnel (HTTPS)
  2. Enter the Funnel URL in Matedroid settings
  3. App fails to connect

Fix

Increase connectTimeout to at least 5 seconds:

.connectTimeout(5, TimeUnit.SECONDS)

Or make it configurable in settings.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions