Skip to content

Commit aa94194

Browse files
authored
Merge pull request #24 from vaikas/fix-segv
Fix segv when removing the last socket entry.
2 parents a508151 + 5899a01 commit aa94194

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ static void state_remove_socket_fd(struct state *state, int socket_fd) {
119119
for (conn = state->conns; conn->next != NULL; conn = conn->next) {
120120
if (conn->next->socket_fd == socket_fd) {
121121
conn->next = conn->next->next;
122+
break;
122123
}
123124
}
124125
}

0 commit comments

Comments
 (0)