Hi nostr:npub1drvpzev3syqt0kjrls50050uzf25gehpz9vgdw08hvex7e...

126103bfddc8df25...
npub1zfss807aer0j26mwp2la0ume0jqde3823rmu97ra6sgyyg956e0s6xw445
hex
95c6a1501cfd214caa05dc71ab1bb2f9b14809f968b782239690abacb7c12855nevent
nevent1qqsft34p2qw06g2v4gzacudtrwe0nv2gp8uk3duzywtfp2avklqjs4gprpmhxue69uhhyetvv9ujuem4d36kwatvw5hx6mm9qgspycgrhlwu3he9ddhq407h7duheqxucn4g3a7zlp7agyzzyz6dvhct9v9wdKind-1 (TextNote)
↳ 回复 126103bf... (npub1zfss807aer0j26mwp2la0ume0jqde3823rmu97ra6sgyyg956e0s6xw445)
Both. I'm just tested the sqlite backend, it still have same issue.
Hi nostr:npub1drvpzev3syqt0kjrls50050uzf25gehpz9vgdw08hvex7e0vgfeq0eseet , I think I've found the problem here. It looks like the SDK is waiting for the timeout to finish before returning the result, instead of returning immediately after receiving the event from the relay.
I've created a simple flow like this:
- Spawn a task to listen for notifications via
client.notifications() - In another task, send an event to the relay and get the output:
let event = client.send_event(event).await? - You will see the notification in task <1> receive the OK event from the relay immediately.
- However, in task <2>, the output only returns after 10 seconds (the default timeout).
Sorry for put the issue here. My GH account is locked, I will create another one later.
原始 JSON
{
"kind": 1,
"id": "95c6a1501cfd214caa05dc71ab1bb2f9b14809f968b782239690abacb7c12855",
"pubkey": "126103bfddc8df256b6e0abfd7f3797c80dcc4ea88f7c2f87dd4104220b4d65f",
"created_at": 1770951369,
"tags": [
[
"e",
"02e72781dc914ad4b1bb53f6599fcce3d07e68ff7be789164221b769d8de2efc",
"wss://nostr.wine/",
"root",
"126103bfddc8df256b6e0abfd7f3797c80dcc4ea88f7c2f87dd4104220b4d65f"
],
[
"e",
"927096643670cf178790f1916c4feccc71c4e5c9fea8c9faf0bd78dc2bb5f74e",
"wss://relay.gulugulu.moe/",
"reply",
"126103bfddc8df256b6e0abfd7f3797c80dcc4ea88f7c2f87dd4104220b4d65f"
],
[
"p",
"68d81165918100b7da43fc28f7d1fc12554466e1115886b9e7bb326f65ec4272"
]
],
"content": "Hi nostr:npub1drvpzev3syqt0kjrls50050uzf25gehpz9vgdw08hvex7e0vgfeq0eseet ,\nI think I've found the problem here. It looks like the SDK is waiting for the timeout to finish before returning the result, instead of returning immediately after receiving the event from the relay.\n\nI've created a simple flow like this:\n1. Spawn a task to listen for notifications via `client.notifications()`\n2. In another task, send an event to the relay and get the output: `let event = client.send_event(event).await?`\n3. You will see the notification in task \u003c1\u003e receive the OK event from the relay immediately.\n4. However, in task \u003c2\u003e, the output only returns after 10 seconds (the default timeout).\n\nSorry for put the issue here. My GH account is locked, I will create another one later.",
"sig": "21a45e3809eca087ef086235b61db6621c7cf9a7b3390efaff5a51c2cb13dfaf0b628fb033d16c3c405cb0d08de64bea4ae35c39dd0300e59975c7a2f3b5ef82"
}