Ignore:
Timestamp:
Jul 20, 2020, 10:23:32 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
289a21c
Parents:
2ecbd7b
Message:

Fixed handling of closed connections.
Started work on cleanly closing server

File:
1 edited

Legend:

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

    r2ecbd7b re95a117  
    3333void main( Worker & this ) {
    3434        CONNECTION:
    35         while( int fd = take(wait_connect); fd >= 0) {
    36             printf("New connection, waiting for requests\n");
     35        for() {
     36                int fd = take(wait_connect);
     37                if (fd < 0) break;
     38
     39                printf("New connection %d, waiting for requests\n", fd);
    3740                REQUEST:
    3841                for() {
     
    105108                }
    106109
    107             printf("New connection accepted\n");
     110                printf("New connection accepted\n");
    108111                put( wait_connect, ret );
    109       }
     112        }
    110113}
Note: See TracChangeset for help on using the changeset viewer.