Switch to more consistently setting sockets non-blocking.

This commit is contained in:
Ian Gulliver
2016-02-17 22:22:14 -08:00
parent 4398deb2d4
commit 820d5d6192
2 changed files with 3 additions and 7 deletions

6
send.c
View File

@@ -4,7 +4,6 @@
#include <strings.h>
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <signal.h>
#include "common.h"
@@ -98,11 +97,6 @@ struct serializer *send_get_serializer(char *name) {
}
void send_add(int fd, struct serializer *serializer) {
int flags = fcntl(fd, F_GETFL, 0);
assert(flags >= 0);
flags |= O_NONBLOCK;
assert(fcntl(fd, F_SETFL, flags) == 0);
if (!send_hello(fd, serializer)) {
fprintf(stderr, "S xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx: Failed to write hello\n");
return;