Skip to content

How long is data safe to use? #77

Answered by ghost
dekdevy asked this question in Q&A
Discussion options

You must be logged in to vote

WebSocket messages, Http headers, urls, methods, and everything that is not the socket itself dies with return, so if you don't handle it before returning or yielding by await you will need to copy it somewhere.

You only need to copy what you actually need, so if you need the url - copy only the url. Same goes with one particular header value, etc.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant
Converted from issue

This discussion was converted from issue #77 on December 09, 2020 11:52.