title: stomp disconnects its processing twice in channel interceptor and SimpleBrokerMessageHandler
body: <p>I have modified to implement channel interceptor in spring-websocket-portfolio sample application (<a href="https://github.com/rstoyanchev/spring-websocket-portfolio" rel="nofollow">https://github.com/rstoyanchev/spring-websocket-portfolio</a>). whenever the client disconnects, channel interceptor is processed twice. I have similar implementation in my production application. As it is being invoked twice so it has unwanted result for the 2nd invocation. I had put work around for the time being. But wondering why my channel interceptor is invoked twice? Any help would be highly appreciated.</p>
  
  <p>modified items: <br><strong>WebSocketConfig.java</strong>:</p>
  
  <pre><code>@Override
  public void configureClientInboundChannel(ChannelRegistration registration)    {
      registration.setInterceptors(channelInterceptor());
   }
  
  @Bean
  public ChannelInterceptor channelInterceptor() {
      return new ChannelInterceptor();
  }
  </code></pre>
  
  <p><strong>ChannelInterceptor</strong> :</p>
  
  <pre><code>package org.springframework.samples.portfolio.config;
  
  import org.springframework.messaging.Message;
  import org.springframework.messaging.MessageChannel;
  import org.springframework.messaging.simp.stomp.StompHeaderAccessor;
  import org.springframework.messaging.support.ChannelInterceptorAdapter;
  
  public class ChannelInterceptor extends ChannelInterceptorAdapter {
  
  @Override
  public void postSend(Message&lt;?&gt; message, MessageChannel channel, boolean   sent) {
      StompHeaderAccessor sha = StompHeaderAccessor.wrap(message);
      System.out.println(sha.getCommand() + "  " + sha);
      switch (sha.getCommand()) {
          case CONNECT: {
              System.out.println("connected:"+sha.getSessionId());
               break;
          }
          case DISCONNECT: {
              System.out.println("disconnected:"+sha.getSessionId());
              break;
          }
          default:
              System.out.println("default:"+sha.getCommand());
              break;
        }
    }
  }
  </code></pre>
  
  <p><strong>logs:</strong></p>
  
  <pre><code>**disconnected**:9k1hvln6
  **disconnected**:9k1hvln6
  </code></pre>