Switch to more consistently setting sockets non-blocking.
This commit is contained in:
6
send.c
6
send.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user