Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 792c6ea9 authored by Kansho Nishida's avatar Kansho Nishida Committed by android-build-merger
Browse files

Merge "dumpstate: close socket after accepting" am: 56a8c96e am: cf141766 am: 475d217e

am: 0f7700a2

Change-Id: Id6a044347e18bdca5073480d2f3f3ec51adf0086
parents f8b7740d 0f7700a2
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -733,6 +733,11 @@ int open_socket(const char *service) {
    struct sockaddr addr;
    socklen_t alen = sizeof(addr);
    int fd = accept(s, &addr, &alen);

    // Close socket just after accept(), to make sure that connect() by client will get error
    // when the socket is used by the other services.
    close(s);

    if (fd < 0) {
        MYLOGE("accept(control socket): %s\n", strerror(errno));
        return -1;