Allocate DCB on owning thread
The DCB is now fully allocated on the thread that owns it. This guarantees that the owner is always correct when it is used. The code in poll_add_dcb still manipulates which worker the DCB is allocated. This needs to be removed and the detection of special needs (maxadmin, maxinfo) must be moved into the listener.
This commit is contained in:
@ -271,9 +271,18 @@ private:
|
||||
/**
|
||||
* Accept a single client connection
|
||||
*
|
||||
* @param fd The opened file descriptor to which the client is connected to
|
||||
* @param addr The network information
|
||||
* @param host The host where the client is connecting from
|
||||
*
|
||||
* @return The new DCB or nullptr on error
|
||||
*/
|
||||
DCB* accept_one_dcb();
|
||||
DCB* accept_one_dcb(int fd, const sockaddr_storage* addr, const char* host);
|
||||
|
||||
/**
|
||||
* Accept all available client connections
|
||||
*/
|
||||
void accept_connections();
|
||||
|
||||
/**
|
||||
* The file descriptor for accepting new connections
|
||||
|
Reference in New Issue
Block a user