Fixed incorrect timeout go routine.
The idle timeout go routine was always started even if it was already running
and it didn't check whether the channel was nil.