added functionality if server closes unexpectedly, close clients