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

Unable to raise KjException of type DISCONNECTED inside a server #324

Open
tobiasah opened this issue Aug 29, 2023 · 0 comments
Open

Unable to raise KjException of type DISCONNECTED inside a server #324

tobiasah opened this issue Aug 29, 2023 · 0 comments

Comments

@tobiasah
Copy link
Contributor

Is there a way to cause the pycapnp server implementation to send a KjException with Type kj::Exception::Type::DISCONNECTED to the client?

Background We have a streaming mechanism based on the stream functionality. The Client is implemented in c++ and expects a kj::Exception of type kj::Exception::Type::DISCONNECTED for a proper disconnect.

As an additional note the server is no longer needed after that disconnect. Also, the only reference to this server is held by pycapnp itself.

I tried doing that in the python client by:

raise capnp.KjException(
   type=capnp.KjException.Type.DISCONNECTED, message=msg
)

The C++ client does receive the exception but it is of type kj::Exception::Type::FAILED which makes kind of sense when looking at the pycapnp code.

Is there a way of achieving this or is it simply not possible?

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

1 participant