return;
sockets->max_count = 20;
}
- else if(sockets->count + 1 > sockets->max_count) {
- curl_socket_t *oldptr = sockets->sockets;
- sockets->sockets = realloc(oldptr, sizeof(curl_socket_t) *
- (sockets->max_count + 20));
- if(!sockets->sockets) {
- /* cleanup in test_cleanup */
- sockets->sockets = oldptr;
- return;
- }
- sockets->max_count += 20;
+ else if(sockets->count >= sockets->max_count) {
+ /* this can't happen in normal cases */
+ fprintf(stderr, "too many file handles error\n");
+ exit(2);
}
/*
* Add file descriptor to array.