You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/04/08 02:21:45 UTC

[GitHub] beiwei30 closed pull request #1562: typo fix

beiwei30 closed pull request #1562: typo fix
URL: https://github.com/apache/incubator-dubbo/pull/1562
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/support/header/HeaderExchangeServer.java b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/support/header/HeaderExchangeServer.java
index 6d77a1822a..67b9ff2e20 100644
--- a/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/support/header/HeaderExchangeServer.java
+++ b/dubbo-remoting/dubbo-remoting-api/src/main/java/com/alibaba/dubbo/remoting/exchange/support/header/HeaderExchangeServer.java
@@ -54,7 +54,7 @@
                     true));
     private final Server server;
     // heartbeat timer
-    private ScheduledFuture<?> heatbeatTimer;
+    private ScheduledFuture<?> heartbeatTimer;
     // heartbeat timeout (ms), default value is 0 , won't execute a heartbeat.
     private int heartbeat;
     private int heartbeatTimeout;
@@ -70,7 +70,7 @@ public HeaderExchangeServer(Server server) {
         if (heartbeatTimeout < heartbeat * 2) {
             throw new IllegalStateException("heartbeatTimeout < heartbeatInterval * 2");
         }
-        startHeatbeatTimer();
+        startHeartbeatTimer();
     }
 
     public Server getServer() {
@@ -134,7 +134,7 @@ private void sendChannelReadOnlyEvent() {
                 if (channel.isConnected())
                     channel.send(request, getUrl().getParameter(Constants.CHANNEL_READONLYEVENT_SENT_KEY, true));
             } catch (RemotingException e) {
-                logger.warn("send connot write messge error.", e);
+                logger.warn("send cannot write message error.", e);
             }
         }
     }
@@ -205,7 +205,7 @@ public void reset(URL url) {
                 if (h != heartbeat || t != heartbeatTimeout) {
                     heartbeat = h;
                     heartbeatTimeout = t;
-                    startHeatbeatTimer();
+                    startHeartbeatTimer();
                 }
             }
         } catch (Throwable t) {
@@ -232,10 +232,10 @@ public void send(Object message, boolean sent) throws RemotingException {
         server.send(message, sent);
     }
 
-    private void startHeatbeatTimer() {
+    private void startHeartbeatTimer() {
         stopHeartbeatTimer();
         if (heartbeat > 0) {
-            heatbeatTimer = scheduled.scheduleWithFixedDelay(
+            heartbeatTimer = scheduled.scheduleWithFixedDelay(
                     new HeartBeatTask(new HeartBeatTask.ChannelProvider() {
                         public Collection<Channel> getChannels() {
                             return Collections.unmodifiableCollection(
@@ -248,14 +248,14 @@ private void startHeatbeatTimer() {
 
     private void stopHeartbeatTimer() {
         try {
-            ScheduledFuture<?> timer = heatbeatTimer;
+            ScheduledFuture<?> timer = heartbeatTimer;
             if (timer != null && !timer.isCancelled()) {
                 timer.cancel(true);
             }
         } catch (Throwable t) {
             logger.warn(t.getMessage(), t);
         } finally {
-            heatbeatTimer = null;
+            heartbeatTimer = null;
         }
     }
 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services