socket track

fixes a bug where the number of open sockets keeps getting subtracted even when the socket has already been closed