Changeset 53449a4 for benchmark


Ignore:
Timestamp:
Dec 16, 2020, 4:01:57 PM (5 years ago)
Author:
Colby Alexander Parsons <caparsons@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum, stuck-waitfor-destruct
Children:
8ba363e, c8025a21
Parents:
b3c8496 (diff), 3e5dd913 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
benchmark
Files:
1 added
1 edited

Legend:

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

    rb3c8496 r53449a4  
    7575        address.sin_port = htons( options.socket.port );
    7676
    77         ret = bind( server_fd, (struct sockaddr *)&address, sizeof(address) );
    78         if(ret < 0) {
    79                 abort( "bind error: (%d) %s\n", (int)errno, strerror(errno) );
     77        int waited = 0;
     78        for() {
     79                ret = bind( server_fd, (struct sockaddr *)&address, sizeof(address) );
     80                if(ret < 0) {
     81                        if(errno == 98) {
     82                                if(waited == 0) {
     83                                        printf("Waiting for port\n");
     84                                } else {
     85                                        printf("\r%d", waited);
     86                                        fflush(stdout);
     87                                }
     88                                waited ++;
     89                                sleep( 1`s );
     90                                continue;
     91                        }
     92                        abort( "bind error: (%d) %s\n", (int)errno, strerror(errno) );
     93                }
     94                break;
    8095        }
    8196
Note: See TracChangeset for help on using the changeset viewer.