mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-16 00:58:05 -05:00
BUG/MINOR: session: mark the handshake as complete earlier
There is a small waste of CPU cycles when no handshake is required on an accepted connection, because we had to perform one call to conn_fd_handler() to mark the connection CONNECTED and to call process_session() again to say that nothing happened. By marking the connection CONNECTED when there is no pending handshake, we avoid this extra call to process_session().
This commit is contained in:
parent
798f4325fa
commit
815f5ecffa
1 changed files with 2 additions and 1 deletions
|
|
@ -210,7 +210,8 @@ int session_accept(struct listener *l, int cfd, struct sockaddr_storage *addr)
|
|||
return 1;
|
||||
}
|
||||
|
||||
/* OK let's complete session initialization */
|
||||
/* OK let's complete session initialization since there is no handshake */
|
||||
s->si[0].conn->flags |= CO_FL_CONNECTED;
|
||||
ret = session_complete(s);
|
||||
if (ret > 0)
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue