anchor.diff:              end
       end.
   
  -handle_abnormal_closure(#state{wsstate=WSState}=State) ->
  +handle_abnormal_closure(#state{wsstate=WSState}=State, Info) ->
       %% The only way we should get here is due to an abnormal close. Section
       %% 7.1.5 of RFC 6455 specifies 1006 as the connection close code for
       %% abnormal closure. It's also described in section 7.4.1.
       CloseStatus    = ?WS_STATUS_ABNORMAL_CLOSURE,
  -    ClosePayload   = <<CloseStatus:16/big>>,
  +    ClosePayload   = <<CloseStatus:16/big, Info/binary>>,
       CloseWSState   = WSState#ws_state{sock=undefined,frag_type=none},
       CloseFrameInfo = #ws_frame_info{fin         = 1,
                                       rsv         = 0,
                                       opcode      = close,
                                       masked      = 0,
                                       masking_key = <<>>,
  -                                    length      = 2,
  +                                    length      = byte_size(ClosePayload),
                                       payload     = ClosePayload,
                                       data        = ClosePayload,
                                       ws_state    = CloseWSState},
  
positive.code:     % error_logger:error_msg("endpoint gone away !", []),
      State1 = State#state{wait_pong_frame=false},
      case get_opts(drop_on_timeout, State1#state.opts) of
          true  -> handle_abnormal_closure(State1);
          false -> handle_callback(info, [State1, timeout])
      end;
  
  
negative.code:         State#state.close_timer /= undefined ->
              {stop, normal, State};
          true ->
              handle_abnormal_closure(State, <<"ssl_closed">>)
      end;
  
  
  