```
if not buf:
    return
```

No need to call the handlers when EOF.