Skip to content
Snippets Groups Projects

quad: don't block for client on virtual quad

Closed bbartels requested to merge virt_quad_noblock into virt_quad
1 unresolved thread
1 file
+ 9
1
Compare changes
  • Side-by-side
  • Inline
@@ -13,7 +13,7 @@
int check_socket_client();
static int backendSocket;
static int client;
static int client = -1;
int unix_uart_reset(struct UARTDriver *self) {
char * backend_socket_path = DEFAULT_SOCKET;
@@ -70,6 +70,14 @@ int check_socket_client() {
return -1;
}
printf("backend connection found on socket %d.\n", client);
} else {
char c;
ssize_t x;
if ((x = recv(client, &c, 1, MSG_PEEK)) <= 0) {
client = -1;
printf("backend connection lost\n");
return -1;
}
}
return 0;
}
Loading