Commit 8bcc237
committed
Fix Windows port leak in quiesce_does_not_crash test
MHD_quiesce_daemon transfers the listen socket to the caller. On
Windows, MHD sockets are Winsock SOCKETs and POSIX close() from
<unistd.h> does not close them, so the prior version leaked the
socket and left port 8080 bound. The next test in the same binary
(external_event_loop) then failed MHD_start_daemon with
"Unable to connect daemon to port: 8080".
Use closesocket() on Windows and close() elsewhere.1 parent a409ca2 commit 8bcc237
1 file changed
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
| 26 | + | |
23 | 27 | | |
24 | 28 | | |
25 | 29 | | |
| |||
126 | 130 | | |
127 | 131 | | |
128 | 132 | | |
129 | | - | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
130 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
131 | 142 | | |
| 143 | + | |
132 | 144 | | |
133 | 145 | | |
134 | 146 | | |
| |||
0 commit comments