* commit 'f03aa6670e39ef1a46211960d134b2528a3649f5': adb: keep all asocket operations in the main thread.
This commit is contained in:
commit
4edb97abb7
2 changed files with 5 additions and 4 deletions
|
|
@ -243,6 +243,11 @@ void handle_offline(atransport *t)
|
||||||
D("adb: offline\n");
|
D("adb: offline\n");
|
||||||
//Close the associated usb
|
//Close the associated usb
|
||||||
t->online = 0;
|
t->online = 0;
|
||||||
|
|
||||||
|
// This is necessary to avoid a race condition that occured when a transport closes
|
||||||
|
// while a client socket is still active.
|
||||||
|
close_all_sockets(t);
|
||||||
|
|
||||||
run_transport_disconnects(t);
|
run_transport_disconnects(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -330,10 +330,6 @@ static void *input_thread(void *_t)
|
||||||
put_apacket(p);
|
put_apacket(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
// this is necessary to avoid a race condition that occured when a transport closes
|
|
||||||
// while a client socket is still active.
|
|
||||||
close_all_sockets(t);
|
|
||||||
|
|
||||||
D("%s: transport input thread is exiting, fd %d\n", t->serial, t->fd);
|
D("%s: transport input thread is exiting, fd %d\n", t->serial, t->fd);
|
||||||
kick_transport(t);
|
kick_transport(t);
|
||||||
transport_unref(t);
|
transport_unref(t);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue