extend log on unknown internal state

Specify what client has trigger the unknown internal state
master
tiptorrent development team 2021-09-10 17:50:31 +02:00
parent d0c8b24985
commit b7b410ddc2
1 changed files with 4 additions and 2 deletions

View File

@ -168,7 +168,8 @@ static void tip_client_read_cb(struct ev_loop *loop, struct ev_io *io, int event
ev_io_start(loop, &cli->io);
break;
default:
syslog(LOG_ERR, "unknown read state, critical internal error\n");
syslog(LOG_ERR, "unknown read state, critical internal error for %s:%hu\n",
inet_ntoa(cli->addr.sin_addr), ntohs(cli->addr.sin_port));
goto close;
}
return;
@ -268,7 +269,8 @@ static void tip_client_write_cb(struct ev_loop *loop, struct ev_io *io, int even
}
break;
default:
syslog(LOG_ERR, "unknown write state, critical internal error\n");
syslog(LOG_ERR, "unknown write state, critical internal error for %s:%hu\n",
inet_ntoa(cli->addr.sin_addr), ntohs(cli->addr.sin_port));
goto close;
}
return;