Use counter for opened sockets instead of counting child sockets