The socket still has a _handle when maybeDestroy() is called. Inverting the check or removing it altogether fixes it.