{
 "number": 36716,
 "repo": "bitcoin/bitcoin",
 "url": "https://github.com/bitcoin/bitcoin/pull/36716",
 "title": "net: stop monitoring select exceptions outside Windows",
 "author": "Sjors",
 "author_association": "MEMBER",
 "created_at": "2026-10-31T04:13:49Z",
 "updated_at": "2026-11-01T07:43:06Z",
 "description_hash": "8b4580aec44e357c",
 "age_days": 1,
 "draft": false,
 "labels": [
  "P2P"
 ],
 "milestone": null,
 "base": "master",
 "head_sha": "8754e5c1c4746e7f062eb705c07440afb16529dc",
 "head_ref": "2026/10/windows-select-exceptions",
 "head_repo": "Sjors/bitcoin",
 "head_history": [],
 "additions": 23,
 "deletions": 0,
 "changed_files": 3,
 "commit_count": 2,
 "size_bucket": "S",
 "mergeable_state": "clean",
 "bot": {
  "drahtbot": {
   "present": true,
   "reviews": {},
   "conflicts": []
  }
 },
 "acks_parsed": {},
 "acks_tally": {
  "ack": 0,
  "stale_ack": 0,
  "concept_ack": 0,
  "approach_ack": 0,
  "nack": 0,
  "concept_nack": 0,
  "approach_nack": 0
 },
 "reviews": {
  "approved": 0,
  "changes_requested": 0,
  "distinct_reviewers": [
   "pinheadmz"
  ]
 },
 "signals": {
  "needs_rebase": false,
  "ci_failed": false,
  "mergeable_state": "clean",
  "last_author_activity": "2026-11-01T07:42:57Z",
  "last_reviewer_activity": "2026-10-31T11:38:09Z",
  "last_reviewer": "pinheadmz",
  "author_silent_days": 0,
  "waiting_on_author_days": 0,
  "days_since_update": 0
 },
 "refs": {
  "mentioned": [
   36688
  ],
  "depends_on": [],
  "fixes": [],
  "linked_issues": [],
  "references": [
   {
    "number": 36688,
    "type": "pull",
    "state": "closed",
    "merged": false,
    "merged_at": null,
    "title": "net: receive TCP urgent data inline"
   }
  ],
  "conflicts": []
 },
 "stack": {
  "shares_commits_with": [],
  "based_on": [],
  "base_for": []
 },
 "review_paths": [],
 "body": "Alternative approach to #36688, citing the relevant parts of its description:\n\n[quoted text omitted]\nFix this by ignoring the exceptionSet. Except on Windows, where we instead disconnect if its used.\n\nWe could instead have set `SO_OOBINLINE` on our sockets, so `recv()` returns any urgent data sent to us (and likely leads us to disconnect the peer). But this goes against the spirit of RFC 6093, as documented in the second commit.",
 "commits": [
  {
   "sha": "1fde57f1deda683129ccead9c30cfad0e235914e",
   "date": "2026-10-31T04:00:13Z",
   "message": "net: stop monitoring select exceptions outside Windows\n\nWindows needs select's exception set to detect failed non-blocking\nconnects. On other platforms, a TCP urgent pointer can leave the\nexception set pending even when no data is readable. Only monitor it\non Windows, and disconnect established P2P peers if it is set.\n\nCo-authored-by: Antoine Poinsot <mail@antoinep.com>"
  },
  {
   "sha": "8754e5c1c4746e7f062eb705c07440afb16529dc",
   "date": "2026-10-31T04:00:23Z",
   "message": "doc: explain why P2P does not set SO_OOBINLINE"
  }
 ],
 "timeline": [
  {
   "t": "2026-10-31T11:38:09Z",
   "kind": "comment",
   "who": "pinheadmz",
   "assoc": "MEMBER",
   "text": "Mine as well apply the same logic to HTTP, probably right here:\n\nhttps://github.com/bitcoin/bitcoin/blob/5669fda5ed85ac739c1678c03bd7c25193d099c6/src/httpserver.cpp#L916-L918\n\nI wrote functional test for the first PR, could be adapted to ensuring HTTP disconnects on urgent data:\n\nhttps://gist.github.com/pinheadmz/f5bb77865f870865e44c54d5751b569a",
   "id": "c:6542871465",
   "url": "https://github.com/bitcoin/bitcoin/pull/36716#issuecomment-6542871465",
   "hash": "6ee898d38e70324c",
   "edited": "2026-10-31T11:39:47Z"
  },
  {
   "t": "2026-11-01T07:42:57Z",
   "kind": "comment",
   "who": "Sjors",
   "assoc": "MEMBER",
   "text": "My preference is to fix HTTP separately as a followup, but I'm open to doing it here.",
   "id": "c:6555092908",
   "url": "https://github.com/bitcoin/bitcoin/pull/36716#issuecomment-6555092908",
   "hash": "b0d4645c9a31b443",
   "edited": "2026-11-01T07:43:06Z"
  }
 ],
 "labels_log": [
  {
   "t": "2026-10-31T04:13:53Z",
   "action": "labeled",
   "label": "P2P",
   "who": "DrahtBot"
  }
 ],
 "state_log": [],
 "text_chars": 1340,
 "text_tokens_estimate": 335,
 "changed_paths": [
  "src/net.cpp",
  "src/netbase.cpp",
  "src/util/sock.cpp"
 ],
 "files": [
  {
   "path": "src/net.cpp",
   "add": 12,
   "del": 0
  },
  {
   "path": "src/netbase.cpp",
   "add": 8,
   "del": 0
  },
  {
   "path": "src/util/sock.cpp",
   "add": 3,
   "del": 0
  }
 ],
 "test_lines": 0,
 "git": {
  "head": "8754e5c1c4746e7f062eb705c07440afb16529dc",
  "head_matches_backup": true,
  "base": "ab7e668cc6af5d716ad40166d1f88235a2f6d25d",
  "patch_id": "4f5d654f8c3af3a4",
  "commits": [
   {
    "sha": "1fde57f1de",
    "subject": "net: stop monitoring select exceptions outside Windows",
    "files": 2,
    "add": 15,
    "del": 0
   },
   {
    "sha": "8754e5c1c4",
    "subject": "doc: explain why P2P does not set SO_OOBINLINE",
    "files": 1,
    "add": 8,
    "del": 0
   }
  ],
  "patch_truncated": false
 },
 "patch_id": "4f5d654f8c3af3a4",
 "input_hash": "ef6f108ccc07dfe2",
 "extracted_at": "2026-11-02T01:09:49+00:00"
}