Fix TcpListener re-init.

This commit is contained in:
levlam 2020-11-10 02:02:36 +03:00
parent 7febd4f9af
commit 1fa87babb3
1 changed files with 3 additions and 0 deletions

View File

@ -40,6 +40,9 @@ void TcpListener::tear_down() {
void TcpListener::loop() {
if (server_fd_.empty()) {
start_up();
if (server_fd_.empty()) {
return;
}
}
sync_with_poll(server_fd_);
while (can_read_local(server_fd_)) {