diff --git a/docs/notes/Socket.md b/docs/notes/Socket.md index 6138490c..38aef777 100644 --- a/docs/notes/Socket.md +++ b/docs/notes/Socket.md @@ -273,7 +273,7 @@ else if ( ret == 0 ) else { // Check if any events detected - for ( int i = 0; i < ret; i++ ) + for ( int i = 0; i < ready; i++ ) { if ( pevents[i].events & EPOLLIN ) { diff --git a/notes/Socket.md b/notes/Socket.md index 6138490c..38aef777 100644 --- a/notes/Socket.md +++ b/notes/Socket.md @@ -273,7 +273,7 @@ else if ( ret == 0 ) else { // Check if any events detected - for ( int i = 0; i < ret; i++ ) + for ( int i = 0; i < ready; i++ ) { if ( pevents[i].events & EPOLLIN ) {