anchor.diff:  is_close_frame(_) -> false.
   
   -spec websocket_close(#state{}, any(), terminate_reason()) -> no_return().
  -websocket_close(State=#state{socket=Socket, transport=Transport, extensions=Extensions},
  -		HandlerState, Reason) ->
  -	case Reason of
  +websocket_close(State, HandlerState, Reason) ->
  +	websocket_send_close(State, Reason),
  +	terminate(State, HandlerState, Reason).
  +
  +websocket_send_close(#state{socket=Socket, transport=Transport,
  +		extensions=Extensions}, Reason) ->
  +	_ = case Reason of
   		Normal when Normal =:= stop; Normal =:= timeout ->
   			Transport:send(Socket, cow_ws:frame({close, 1000, <<>>}, Extensions));
   		{error, badframe} ->
  
positive.code: 				ok ->
  					NextState(State, HandlerState2, RemainingData);
  				stop ->
  					handler_terminate(State, HandlerState2, stop);
  				Error = {error, _} ->
  					handler_terminate(State, HandlerState2, Error)
  			end;
  		{reply, Payload, HandlerState2, hibernate} ->
  			case websocket_send(Payload, State) of
  
negative.code: 			websocket_payload(State2, HandlerState,
  				Type, Len, MaskKey, Rsv, CloseCode, Unmasked, UnmaskedLen, Data);
  		{Closed, Socket} ->
  			terminate(State, HandlerState, {error, closed});
  		{Error, Socket, Reason} ->
  			terminate(State, HandlerState, {error, Reason});
  		{timeout, TRef, ?MODULE} ->
  			websocket_close(State, HandlerState, timeout);
  		{timeout, OlderTRef, ?MODULE} when is_reference(OlderTRef) ->
  