{"id":"XE-13312","kind":"bounty","visibility":"public","source":"github","source_repo":"xeprotocol/xe","source_ref":"457","source_url":"https://github.com/xeprotocol/xe/issues/457","reporter_id":2483,"title":"[net/gossip.go] H11: peerPing() tidak handle timeout — goroutine leak","area":"p2p-sync","claimed_tier":null,"assessed_tier":null,"verdict":"invalid","duplicate_of":null,"tracked":false,"internal_ref":"","internal_url":"","status":"closed","closed_reason":"invalid","github_state":"closed","disclosed_at":null,"award_xe":null,"award_approved":false,"paid_ref":"","created_at":"2026-11-14T20:42:09.193609+00:00","updated_at":"2026-11-20T00:51:19.708415+00:00","source_created_at":"2026-11-12T02:55:13+00:00","told_at":"2026-11-20T00:50:20+00:00","status_changed_at":"2026-11-20T00:33:26.399631+00:00","url":"https://bounty.xe.network/XE-13312","body":"## Ringkasan\nKalau peer tidak merespon dalam waktu yang ditentukan, goroutine tetap berjalan. Tidak ada timeout mechanism.\n\n## Lokasi\n- File: `net/gossip.go`\n- Lines: 281-300\n\n## Kode\n```go\nfunc (g *Gossip) peerPing(pid peer.ID) {\n    ...\n    stream, err := g.host.NewStream(g.ctx, pid, GossipProtocolID)\n    if err != nil {\n        logging.Debugf(\"gossip: failed to open stream to %s: %v\", pid, err)\n        return\n    }\n    defer stream.Close()\n    ...\n}\n```\n\n## Impact\nGoroutine leak kalau peer tidak merespon. Resource exhaustion.\n\n## Suggested Fix\n```go\nfunc (g *Gossip) peerPing(ctx context.Context, pid peer.ID) {\n    ...\n    stream, err := g.host.NewStream(ctx, pid, GossipProtocolID)\n    if err != nil {\n        logging.Debugf(\"gossip: failed to open stream to %s: %v\", pid, err)\n        return\n    }\n    defer stream.Close()\n    \n    // tambah timeout\n    select {\n    case <-ctx.Done():\n        return\n    case <-time.After(5 * time.Second):\n        return\n    }\n}\n```","patch_refs":[],"thread":[{"id":13393,"source":"github","source_ref":"7026810020","author":"XE desk","team":true,"body":"Thanks for the report. We read it against the code and could not confirm a bug in what it describes.\n\nThis report is closed as invalid. If we have missed something, file a new report that links\nhttps://bounty.xe.network/XE-13312 and says what; it is read like any other.","created_at":"2026-11-20T00:50:20+00:00"}]}