The fact that computer is connecting does not mean it will be online soon (or ever). IMO should be `c != null && c.isOnline() && c.isAcceptingTasks()`.