On v2.1, window updates are sent ad-hoc when calling recv, just after data is extracted from the incoming buffer. On the other hand, acknowledgements are sent in the context of the packet receiver thread.
In order to be consistent with the semantics of the implementation, these packets should be managed in the context of the packet sender (in particular, inside handle_outgoing).