Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We have an explicit select() call on the cmd_fd even when we're busy shovelling packets and never hit the main select() in the mainloop. This is *just* to ensure that we react to a cancel command quickly. In the *common* case that we're running in openconnect(8), there's no need for that since the *only* thing that will write to the cmd_fd is openconnect itself, and *that* can set a flag in memory to tell us to look. So implement that optimisation — don't check it each time around the mainloop unless the vpninfo->need_poll_cmd_fd flag is set. That flag is set whenever we have written to cmd_fd and there's something to be read. And cleared by poll_cmd_fd() when it runs and finds nothing there. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
- Loading branch information
Showing
5 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters