Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

/**
* MemcachedProtocol
*
*
* @author william.liangf
*/
public class MemcachedProtocol extends AbstractProtocol {
Expand Down Expand Up @@ -67,7 +67,7 @@ public <T> Invoker<T> refer(final Class<T> type, final URL url) throws RpcExcept
final String get = url.getParameter("get", "get");
final String set = url.getParameter("set", Map.class.equals(type) ? "put" : "set");
final String delete = url.getParameter("delete", Map.class.equals(type) ? "remove" : "delete");
return new AbstractInvoker<T>(type, url) {
Invoker invoker = new AbstractInvoker<T>(type, url) {
protected Result doInvoke(Invocation invocation) throws Throwable {
try {
if (get.equals(invocation.getMethodName())) {
Expand Down Expand Up @@ -109,6 +109,8 @@ public void destroy() {
}
}
};
invokers.add(invoker);
return invoker;
} catch (Throwable t) {
throw new RpcException("Failed to refer memecached service. interface: " + type.getName() + ", url: " + url + ", cause: " + t.getMessage(), t);
}
Expand Down