diff options
author | Lukas Larsson <[email protected]> | 2011-11-25 12:21:08 +0100 |
---|---|---|
committer | Lukas Larsson <[email protected]> | 2011-12-01 14:10:06 +0100 |
commit | 9322161952ed25a96578f163cc383be605e7f75c (patch) | |
tree | 3d0a1f5e172e8770d8af36e64de376c1e73e6eef /erts/emulator | |
parent | 82ed2e3d5d959b0dce61056c648bead385c77d65 (diff) | |
download | otp-9322161952ed25a96578f163cc383be605e7f75c.tar.gz otp-9322161952ed25a96578f163cc383be605e7f75c.tar.bz2 otp-9322161952ed25a96578f163cc383be605e7f75c.zip |
Use free_sendfile explicitly for non-async
This is needed because aync job will not call free_sendfile
if there is an async_ready callback.
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/drivers/common/efile_drv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c index b807f110eb..1f13a65350 100644 --- a/erts/emulator/drivers/common/efile_drv.c +++ b/erts/emulator/drivers/common/efile_drv.c @@ -2229,6 +2229,7 @@ file_async_ready(ErlDrvData e, ErlDrvThreadData data) } else { driver_select(desc->port, (ErlDrvEvent)(long)d->c.sendfile.out_fd, ERL_DRV_USE, 0); + free_sendfile(data); } } else if (d->result_ok == 0) { desc->sendfile_state = not_sending; @@ -2238,6 +2239,7 @@ file_async_ready(ErlDrvData e, ErlDrvThreadData data) free_sendfile(data); } else { driver_select(desc->port, (ErlDrvEvent)(long)d->c.sendfile.out_fd, ERL_DRV_USE, 0); + free_sendfile(data); } } else if (d->result_ok == 1) { // If we are using select to send the rest of the data desc->sendfile_state = sending; @@ -3441,7 +3443,6 @@ file_outputv(ErlDrvData e, ErlIOVec *ev) { if (sys_info.async_threads != 0) { SET_BLOCKING(d->c.sendfile.out_fd); - d->free = free_sendfile; } cq_enq(desc, d); |