Fix TcpListener re-init.
This commit is contained in:
parent
7febd4f9af
commit
1fa87babb3
@ -40,6 +40,9 @@ void TcpListener::tear_down() {
|
|||||||
void TcpListener::loop() {
|
void TcpListener::loop() {
|
||||||
if (server_fd_.empty()) {
|
if (server_fd_.empty()) {
|
||||||
start_up();
|
start_up();
|
||||||
|
if (server_fd_.empty()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
sync_with_poll(server_fd_);
|
sync_with_poll(server_fd_);
|
||||||
while (can_read_local(server_fd_)) {
|
while (can_read_local(server_fd_)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user