Changeset 0f1336c for benchmark/io


Ignore:
Timestamp:
Aug 30, 2022, 4:23:57 PM (22 months ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, ast-experimental, master, pthread-emulation
Children:
cefd0b9
Parents:
19cb0cb
Message:

Minor error handling improvement.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/io/http/worker.cfa

    r19cb0cb r0f1336c  
    145145                if( options.log ) mutex(sout) sout | "=== Accepting connection ===";
    146146                int fd = cfa_accept4( this.sockfd, this.[addr, addrlen, flags], CFA_IO_LAZY );
    147                 if(fd < 0) {
     147                if(fd <= 0) {
    148148                        if( errno == ECONNABORTED ) break;
    149149                        if( this.done && (errno == EINVAL || errno == EBADF) ) break;
    150                         abort( "accept error: (%d) %s\n", (int)errno, strerror(errno) );
     150                        abort( "accept error %d: (%d) %s\n", fd, (int)errno, strerror(errno) );
    151151                }
    152152                if(this.done) break;
Note: See TracChangeset for help on using the changeset viewer.