inputLoop goroutine notifies main goroutine of closed connection.