Commit 5b61caf1 authored by legoc's avatar legoc
Browse files

Cancel uses request socket

parent 653e792e
......@@ -177,7 +177,13 @@ public class RequesterImpl {
String content = "cancel";
requestMessage.add(content);
application.tryRequest(requestMessage, endpoint);
// Create the request socket. We can create it here because it should be called only once.
RequestSocket requestSocket = application.createRequestSocket(endpoint);
requestSocket.request(requestMessage);
// Terminate the socket.
requestSocket.terminate();
}
public boolean isCanceled() {
......
......@@ -137,7 +137,13 @@ public class ResponderImpl {
String content = "cancel";
requestMessage.add(content);
application.tryRequest(requestMessage, endpoint);
// Create the request socket. We can create it here because it should be called only once.
RequestSocket requestSocket = application.createRequestSocket(endpoint);
requestSocket.request(requestMessage);
// Terminate the socket.
requestSocket.terminate();
}
public boolean isEnded() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment