Skip to content

Commit

Permalink
SPDY Connection: Make synchronized requests
Browse files Browse the repository at this point in the history
In the SPDY protocol the order of streams is important.
Multi-thread apps that use undertow to interact with SPDY servers
must use a synchronized request in order to guarantee that streams
don't arrive in a messed order in the endpoint.
  • Loading branch information
jwendell committed Sep 14, 2016
1 parent 2c32a68 commit 595322a
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -85,7 +85,7 @@ public void handleEvent(SpdyChannel channel) {
}

@Override
public void sendRequest(ClientRequest request, ClientCallback<ClientExchange> clientCallback) {
public synchronized void sendRequest(ClientRequest request, ClientCallback<ClientExchange> clientCallback) {
request.getRequestHeaders().put(PATH, request.getPath());
request.getRequestHeaders().put(SCHEME, "https");
request.getRequestHeaders().put(VERSION, request.getProtocol().toString());
Expand Down

0 comments on commit 595322a

Please sign in to comment.