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

fix #1845 #1851

Merged
merged 1 commit into from
May 28, 2018
Merged
Show file tree
Hide file tree
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 @@ -454,7 +454,7 @@ public void setExtension(String extension) {
this.extension = extension;
}

public void destory() {
public void destroy() {
if (name != null) {
ExtensionLoader.getExtensionLoader(Protocol.class).getExtension(name).destroy();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public void testDestroy() throws Exception {
MockProtocol2.delegate = protocol;
ProtocolConfig protocolConfig = new ProtocolConfig();
protocolConfig.setName("mockprotocol2");
protocolConfig.destory();
protocolConfig.destroy();
Mockito.verify(protocol).destroy();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,10 @@ private void destroyUnusedInvokers(Map<String, Invoker<T>> oldUrlInvokerMap, Map
try {
invoker.destroy();
if (logger.isDebugEnabled()) {
logger.debug("destory invoker[" + invoker.getUrl() + "] success. ");
logger.debug("destroy invoker[" + invoker.getUrl() + "] success. ");
}
} catch (Exception e) {
logger.warn("destory invoker[" + invoker.getUrl() + "] faild. " + e.getMessage(), e);
logger.warn("destroy invoker[" + invoker.getUrl() + "] faild. " + e.getMessage(), e);
}
}
}
Expand Down