def disconnect(headers = {})
raise Stomp::Error::NoCurrentConnection if @closed_check && closed?
raise Stomp::Error::ProtocolErrorEmptyHeaderKey if headers.has_key?("")
raise Stomp::Error::ProtocolErrorEmptyHeaderValue if @protocol == Stomp::SPL_10 && headers.has_value?("")
headers = headers.symbolize_keys
_headerCheck(headers)
if @protocol >= Stomp::SPL_11
@st.kill if @st
@rt.kill if @rt
end
transmit(Stomp::CMD_DISCONNECT, headers)
@disconnect_receipt = receive if headers[:receipt]
slog(:on_disconnect, log_params)
close_socket
end