Skip to content

Commit

Permalink
fix #1845 (#1851)
Browse files Browse the repository at this point in the history
  • Loading branch information
hqq2023623 authored and lovepoem committed May 28, 2018
1 parent db03f8c commit 2262450
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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

0 comments on commit 2262450

Please sign in to comment.