Commit 932cafe
Document TOCTOU race in findUnusedPort()
Add a comment to findUnusedPort() explaining why the TOCTOU race
between closing the ServerSocket and the caller's connect attempt
is acceptable. Every caller is a negative test that expects the
connection to fail, so a stolen port produces the same outcome.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent 33e5796 commit 932cafe
1 file changed
Lines changed: 5 additions & 0 deletions
File tree
- core/src/test/java/io/questdb/client/test/cutlass/qwp/client
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
725 | 725 | | |
726 | 726 | | |
727 | 727 | | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
728 | 733 | | |
729 | 734 | | |
730 | 735 | | |
| |||
0 commit comments