AppData handles source disconnect

This commit is contained in:
nathan 2023-06-14 21:37:41 -07:00
parent c80f55141c
commit 0440a5c393

View file

@ -91,6 +91,7 @@ void AppData::update() {
}
if ((fd == ANET_ERR) || (recv(c->fd, pk_buf, sizeof(pk_buf), MSG_PEEK | MSG_DONTWAIT) == 0)) {
connected = false;
free(c);
usleep(1000000);
c = (struct client *) malloc(sizeof(*c));