title: Web socket error close codes specific to browser
body: <p>I am using Websockets in my application for streaming purpose .
  I am using Jetty in back end for this purpose </p>
  
  <p>On to the onclose call back method i have this </p>
  
  <pre><code>@Override
      public void onClose(int arg0, String arg1) {
          logger.info("In onClose :: " + arg0 + " :: " + arg1);
  }
  </code></pre>
  
  <p>What i observed is that , the error codes are not generic but specific to browser that is </p>
  
  <p>When i use chrome it displays <code>1006</code> , if browser is closed using ctrl+w , Clicked on Cross Button , or even  user clicked on logout button </p>
  
  <p>but where as in firefox it displays <code>1001</code> if browser is closed using ctrl+w , Clicked on Cross Button , or even  user clicked on logout button </p>
  
  <p>Now the problem is that i really cannot identify why a disconnect has been happened , because as it being a browser specific  ??</p>
  
  <p>please share your views as how to debug in such cases ??</p>