Somehow the line `connectionCount++;` got lost just before here. I've fixed it live on the server. Will commit the better code shortly.