If you turn this into closeSockets(0), you don't have to do the 'is number' check in the function itself.