Skip to content
Permalink
Browse files
fix #1845 (#1851)
  • Loading branch information
hqq2023623 authored and lovepoem committed May 28, 2018
1 parent db03f8c commit 22624508bbd30dd83b09b48303196d7dcd73c410
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
@@ -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();
}
@@ -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();
}

@@ -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);
}
}
}

0 comments on commit 2262450

Please sign in to comment.