mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Fix update of pending_reqs in write_cb
This commit is contained in:
parent
17b275b23a
commit
fc22317389
@ -106,7 +106,8 @@ static void write_cb(uv_write_t *req, int status)
|
||||
data->wstream->curmem -= data->length;
|
||||
}
|
||||
|
||||
if (data->wstream->freed && --data->wstream->pending_reqs == 0) {
|
||||
data->wstream->pending_reqs--;
|
||||
if (data->wstream->freed && data->wstream->pending_reqs == 0) {
|
||||
// Last pending write, free the wstream;
|
||||
free(data->wstream);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user