commit | 4520246d3534c087f3e9253c34f99dd1e45b7bd7 | [log] [tgz] |
---|---|---|
author | Xianzhu Wang <wangxianzhu@google.com> | Thu Sep 29 12:59:55 2011 +0800 |
committer | Xianzhu Wang <wangxianzhu@google.com> | Thu Sep 29 13:42:32 2011 +0800 |
tree | 68fb2d909e6258f785347d60a026b42efeaa93b4 | |
parent | 2a32df25b8bb307693173911041458aaca84c84c [diff] |
Fix SocketListener socket leak issue. The problem was: if a socket is shared between SocketListener and another thread, only if the last reference is removed by SocketListener can the socket be closed, otherwise the socket will leak. This sometimes happens in netd's dnsproxyd. This change let the SocketClient own the socket and close the socket when the SocketClient is destructed. Change-Id: I2865fbfe9ee4d8b3e43d7e02919dbb2d261f70de