Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot recieve notify from another connection. #3

Open
slangmgh opened this issue Jun 17, 2018 · 1 comment
Open

cannot recieve notify from another connection. #3

slangmgh opened this issue Jun 17, 2018 · 1 comment

Comments

@slangmgh
Copy link

Notify can only recieve when sendNotify is send through the same connection with the notify.

proc testConnectionNotify(conn, conn2: apgConnection): Future[bool] {.async.} =
  var r1 = false
  var r2 = false
  await conn.listenNotify("testChannel")
  var notifyFuture1 = conn.notify("testChannel")
  await conn2.sendNotify("testChannel", "payload")
  #await conn.sendNotify("testChannel", "payload")
  var sleepFuture1 = sleepAsync(100)
  await notifyFuture1 or sleepFuture1
  if notifyFuture1.finished:
    echo notifyFuture1.read.payload
    r1 = true
    return true
  else:
    echo "failed"
    return false
@geohuz
Copy link

geohuz commented Feb 23, 2021

I'm encountering the same issue for now, is there any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants