libbinder: RPC socket bound to service thread
This is in preparation of transforming binder RPC to have a more traditional server achitecture where the server accepts new connections, and arbitrarily many can be added. Before this change, there were a few issues: - threads might call accept, but not use the FD they accepted (threads would accidentally trade FDs, and this could create confusing logs) - if a server thread disconnected or finished, another thread might try to reuse the FD being used there Now: - server sockets are associated with the thread from the beginning - when a connection disconnects, the server also removes the connection Bug: 185167543 Test: binderRpcTest (note added ~RpcConnection assert) Change-Id: Icf50a23ba52167c6fbe04ad1a77cfcb6fb3fcc9c
Loading
Please register or sign in to comment