fixed a bug that would cause high CPU usage after a connection reset
added a commandline runnable ping test