Jacob Wright
11/17/2022, 11:50 PMJacob Wright
11/18/2022, 4:29 PMaranchelk
11/19/2022, 3:24 AMstamriel
11/19/2022, 4:43 PMGreylock
11/19/2022, 10:58 PMGreylock
11/19/2022, 10:58 PMGreylock
11/19/2022, 10:58 PMcrosh
11/20/2022, 11:28 AMworkers-rs
wrapper provides, the most idiomatic use case to receive a WS message seems doing ws.events()?.next()
, then drop the EventStream
created by .events()
.
Strangely after the first receiving the DO does not relay the message and the next .next()
call hangs forever. Clients observes ECONNRESET, so something would be wrong. I'm guessing the DO is dropped because the last event listener is dropped after the first receiving, so DO is too.
Can anyone kindly check my hypothesis and give any clue to workaround this issue? It seems like Pin
should be introduced because EventStream
struct has a lifetime tied to the WebSocket
struct so we cannot hold them in a single struct, effectively creating a self-referential struct...aranchelk
11/20/2022, 8:40 PMstamriel
11/21/2022, 8:29 PMaranchelk
11/22/2022, 7:20 PMr2_buckets = [
{ binding = "projectR2", bucket_name = "xxx-p-prod", preview_bucket_name = "xxx-p-dev"},
{ binding = "usersR2", bucket_name = "xxx-u-prod", preview_bucket_name = "xxx-u-dev"}
]
aranchelk
11/22/2022, 7:39 PMkian
11/22/2022, 7:41 PMtoml
[[env.foo.r2_buckets]]
binding = "foo"
bucket_name = "foo"
toml
env.foo.r2_buckets = [
{ binding = "foo", bucket_name = "foo" }
]
toml
[env.foo]
r2_buckets = [
{ binding = "foo", bucket_name = "foo" }
]
aranchelk
11/22/2022, 7:47 PMstamriel
11/22/2022, 8:28 PMarguiot
11/22/2022, 9:40 PMUnsmart | Tech debt
11/22/2022, 9:42 PMarguiot
11/22/2022, 9:44 PMUnsmart | Tech debt
11/22/2022, 9:44 PMarguiot
11/22/2022, 9:46 PMarguiot
11/22/2022, 9:47 PMUnsmart | Tech debt
11/22/2022, 9:56 PMarguiot
11/22/2022, 9:58 PMUnsmart | Tech debt
11/22/2022, 10:02 PMarguiot
11/22/2022, 10:08 PMarguiot
11/22/2022, 10:13 PMHardAtWork
11/22/2022, 10:14 PMUnsmart | Tech debt
11/22/2022, 10:14 PMHardAtWork
11/22/2022, 10:14 PMarguiot
11/22/2022, 10:15 PM