Skip to content

Commit

Permalink
fix: networking on linux (#594)
Browse files Browse the repository at this point in the history
* fix: networking on linux

* refactor for-loop instead of dispatching events
  • Loading branch information
andjordan authored Mar 22, 2024
1 parent 9bbfb53 commit 972ff81
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,11 @@ namespace services
if (FD_ISSET(listener.listenSocket, &readFileDescriptors))
listener.Accept();

for (auto& connector : connectors)
for (auto index = connectors.begin(); index != connectors.end();)
{
auto& connector = *index;
++index;

if (FD_ISSET(connector.connectSocket, &writeFileDescriptors))
connector.Connected();
else if (FD_ISSET(connector.connectSocket, &exceptFileDescriptors))
Expand Down

0 comments on commit 972ff81

Please sign in to comment.