diff options
author | Matthew Wild <mwild1@gmail.com> | 2020-08-08 13:13:50 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2020-08-08 13:13:50 +0100 |
commit | dc206f0ff429cb3da3569c633a76c74d5b4f8d1b (patch) | |
tree | 29127ae0b64bc5de6a449bb04ca373fd64039bec /util/pubsub.lua | |
parent | 11e49af5e884828746f37e37afd4f89d5236c6cb (diff) | |
download | prosody-dc206f0ff429cb3da3569c633a76c74d5b4f8d1b.tar.gz prosody-dc206f0ff429cb3da3569c633a76c74d5b4f8d1b.zip |
net.http: Add request:cancel() method
This is a new API that should be used in preference to http.destroy_request()
when possible, as it ensures the callback is always called (with an error of
course).
APIs that have edge-cases where they don't call callbacks have, from experience,
shown to be difficult to work with and often lead to unintentional leaks when
the callback was expected to free up certain resources.
Diffstat (limited to 'util/pubsub.lua')
0 files changed, 0 insertions, 0 deletions