cfd may still be valid after reaching the 'done' label,
especially in cases like incorrect password authentication in VNC authentication step.
To ensure the connection is properly terminated, we manually close the fd.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 66062 Build 62945: arc lint + arc unit
Event Timeline
| usr.sbin/bhyve/rfb.c | ||
|---|---|---|
| 1194 | This socket is closed in the caller. Note that double-close can be dangerous, especially in a multi-threaded program, since the fd might be reused by a different thread in between the first and second close() calls. | |
| usr.sbin/bhyve/rfb.c | ||
|---|---|---|
| 1194 | Emm, you are right. I have this when I using builtin vnc viewer from the MacOS and it stucks when I type a wrong password. I try to add this and it works. Maybe it is because of other reason. I would close this patch right now. Sorry for the bothering! | |