```
if (scanning) {
    scanLeDevice();
}
```

I can fix this in PR #8.