mirror of
https://github.com/clearml/dropbear
synced 2025-06-04 03:36:26 +00:00
Experiment of always writing data if available. Might waste a writev() with
EAGAIN but always saves a select() - needs testing with bandwidth-limited and CPU-limited situations.
This commit is contained in:
parent
e767bbb41f
commit
db688e3ec1
@ -186,13 +186,7 @@ void session_loop(void(*loophandler)()) {
|
|||||||
/* check for auth timeout, rekeying required etc */
|
/* check for auth timeout, rekeying required etc */
|
||||||
checktimeouts();
|
checktimeouts();
|
||||||
|
|
||||||
/* process session socket's incoming/outgoing data */
|
/* process session socket's incoming data */
|
||||||
if (ses.sock_out != -1) {
|
|
||||||
if (FD_ISSET(ses.sock_out, &writefd) && !isempty(&ses.writequeue)) {
|
|
||||||
write_packet();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ses.sock_in != -1) {
|
if (ses.sock_in != -1) {
|
||||||
if (FD_ISSET(ses.sock_in, &readfd)) {
|
if (FD_ISSET(ses.sock_in, &readfd)) {
|
||||||
if (!ses.remoteident) {
|
if (!ses.remoteident) {
|
||||||
@ -218,6 +212,14 @@ void session_loop(void(*loophandler)()) {
|
|||||||
* during rekeying ) */
|
* during rekeying ) */
|
||||||
channelio(&readfd, &writefd);
|
channelio(&readfd, &writefd);
|
||||||
|
|
||||||
|
/* process session socket's outgoing data */
|
||||||
|
if (ses.sock_out != -1) {
|
||||||
|
if (!isempty(&ses.writequeue)) {
|
||||||
|
write_packet();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (loophandler) {
|
if (loophandler) {
|
||||||
loophandler();
|
loophandler();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user