Changeset ee913e0a for benchmark/io/http/main.cfa
- Timestamp:
- Dec 10, 2020, 4:52:08 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 80444bb
- Parents:
- 297cf18
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
benchmark/io/http/main.cfa
r297cf18 ree913e0a 75 75 address.sin_port = htons( options.socket.port ); 76 76 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; 80 95 } 81 96
Note: See TracChangeset
for help on using the changeset viewer.