Code

whole timer loop was on the wrong side of connection close code