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

Duplex gRPC via Jetty #995

merged 1 commit into from May 19, 2019


None yet
2 participants
Copy link

commented May 17, 2019

Part of square/wire#957

Test prints a trace I can't find the cause of.

14:44:23.901 [qtp873105556-28] WARN  org.eclipse.jetty.server.HttpChannel - /routeguide.RouteGuide/RouteChat
java.lang.IllegalStateException: closed
	at okio.RealBufferedSink.emit(RealBufferedSink.kt:186)
	at misk.web.ResponseKt.writeToJettyResponse(Response.kt:47)
	at misk.web.BoundActionMatch.handle(BoundAction.kt:227)
	at misk.web.jetty.WebActionsServlet.handleCall(WebActionsServlet.kt:72)
	at misk.web.jetty.WebActionsServlet.doPost(WebActionsServlet.kt:53)
	at javax.servlet.http.HttpServlet.service(
	at org.eclipse.jetty.websocket.servlet.WebSocketServlet.service(
	at javax.servlet.http.HttpServlet.service(
	at org.eclipse.jetty.servlet.ServletHolder.handle(
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(

@oldergod oldergod requested a review from swankjesse May 17, 2019

internal class GrpcStreamMarshaller<T>(val adapter: ProtoAdapter<T>) : Marshaller<GrpcReceiveChannel<T>> {
override fun contentType() = MediaTypes.APPLICATION_GRPC_MEDIA_TYPE


This comment has been minimized.

Copy link

swankjesse May 18, 2019


Hmmmm.... Just use the supertype’s name?


class BlockingGrpcChannel<T> : GrpcSendChannel<T>, GrpcReceiveChannel<T> {
private val queue = LinkedBlockingDeque<T>(2)

This comment has been minimized.

Copy link

swankjesse May 18, 2019


2 feels hacky but this class won't survive the week so I'm okay with it.

This comment has been minimized.

Copy link

oldergod May 18, 2019

Author Collaborator

It works with 1 yo
so I changed it to 1

@oldergod oldergod force-pushed the bquenaudon.2019-05-15.jettyrpc branch from e51dbca to eb2e7ac May 18, 2019

@oldergod oldergod merged commit 070a100 into master May 19, 2019

2 checks passed

ci/circleci: java Your tests passed on CircleCI!
ci/circleci: node Your tests passed on CircleCI!

@oldergod oldergod deleted the bquenaudon.2019-05-15.jettyrpc branch May 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.