Consider calling shutdown in the destructor. LGTM.
http://codereview.chromium.org/42387/diff/1008/1012 File src/platform-linux.cc (right): http://codereview.chromium.org/42387/diff/1008/1012#newcode671 Line 671: bool IsValid() const { return socket_ != -1; } Seems like this never fails since socket_ is never set to -1 any more. The only case is if the initial socket creation failed. http://codereview.chromium.org/42387/diff/1008/1012#newcode744 Line 744: if (IsValid()) { You don't want to call shutdown on a socket that failed to open, but you don't mind calling it twice on a socket that was open once. That seems inconsistent. http://codereview.chromium.org/42387/diff/1008/1014 File src/platform.h (right): http://codereview.chromium.org/42387/diff/1008/1014#newcode442 Line 442: // Shutdown socket for both read and write. Needs a comment along the lines of: This wakes up threads and processes blocked on a read or write of the socket. http://codereview.chromium.org/42387 --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
