This prevents the inChan from being closed twice