Merge pull request #21 from EniumRaphael/samy

Fixed, thank you.
This commit is contained in:
Samy BEN TAYEB 2025-06-17 18:40:05 +02:00 committed by GitHub
commit 32d405f150
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -66,6 +66,7 @@ void PollManager::pollLoop(int server_fd, std::vector<int> &newClients, std::vec
void PollManager::addClient(short unsigned fd) void PollManager::addClient(short unsigned fd)
{ {
struct pollfd pfd; struct pollfd pfd;
std::memset(&pfd, 0, sizeof(pfd));
pfd.fd = fd; pfd.fd = fd;
pfd.events = POLLIN; pfd.events = POLLIN;
_fds.push_back(pfd); _fds.push_back(pfd);