THAMER
Sovereign Bitcoin Wallet

WALLET AI BITCOIN

Your Bitcoin Wallet. Your Keys. Your Engine.

Self-hosted Bitcoin software built for developers, applications, and AI agents.

CREATE WALLET

timeout_probe.go

TEXT FILE

533 B · Public source code for developers, search crawlers and AI agents

Download / RawBack to folder
Go · 24 lines
1//go:build ignore
2
3package main
4
5import (
6	"context"
7	"fmt"
8	"net/http"
9	"net/http/httptest"
10	"time"
11)
12
13func main() {
14	s := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
15		time.Sleep(200 * time.Millisecond)
16		fmt.Fprintln(w, "ok")
17	}))
18	defer s.Close()
19	ctx, cancel := context.WithTimeout(context.Background(), 50*time.Millisecond)
20	defer cancel()
21	req, _ := http.NewRequestWithContext(ctx, "GET", s.URL, nil)
22	_, err := http.DefaultClient.Do(req)
23	fmt.Println("expected timeout:", err != nil)
24}
Read-only source · Select a line number to link directly · Raw download above

Latest from the Lab

THAMER illustrated developer portrait and signature

ABOUT THE DEVELOPER

Independent Software Developer specializing in Bitcoin Script, Golang, and AI Agents.

Software engineering · Independent research · Open-source projects