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

Immediately unref the ref provided to createRpcStream() #36

Open
vweevers opened this issue Mar 11, 2022 · 1 comment
Open

Immediately unref the ref provided to createRpcStream() #36

vweevers opened this issue Mar 11, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@vweevers
Copy link
Member

Copied from Level/party#28 (comment): we don't initially unref. You must make at least one db operation for the logic to work. So this hangs:

const name = Date.now().toString()

const db1 = party(name)
const db2 = party(name)

await db1.open()
await db2.open()

console.log('opened')

// Comment this out to not make the event loop hang
// await db1.put('a', 'b')
// console.log(await db2.get('a'))
@vweevers vweevers added the bug Something isn't working label Mar 11, 2022
@vweevers vweevers added this to Level Mar 11, 2022
@vweevers vweevers moved this to Backlog in Level Mar 11, 2022
@vweevers
Copy link
Member Author

On second thought, it might make more sense to do this (i.e. deciding the initial unref/reffed state) in level-party.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Backlog
Development

No branches or pull requests

1 participant