From: Evgeniy Khramtsov Date: Fri, 14 Oct 2011 06:57:51 +0000 (+1000) Subject: Get rid of useless mnesia transaction (EJAB-1502) X-Git-Tag: v2.1.10~28 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=96800e9b7573616732c9cfbf9917849aa80fdccc;p=ejabberd Get rid of useless mnesia transaction (EJAB-1502) --- diff --git a/src/web/ejabberd_http_bind.erl b/src/web/ejabberd_http_bind.erl index 6244bf12f..63b608682 100644 --- a/src/web/ejabberd_http_bind.erl +++ b/src/web/ejabberd_http_bind.erl @@ -283,19 +283,16 @@ handle_session_start(Pid, XmppDomain, Sid, Rid, Attrs, end, XmppVersion = xml:get_attr_s("xmpp:version", Attrs), ?DEBUG("Create session: ~p", [Sid]), - mnesia:transaction( - fun() -> - mnesia:write( - #http_bind{id = Sid, - pid = Pid, - to = {XmppDomain, - XmppVersion}, - hold = Hold, - wait = Wait, - process_delay = Pdelay, - version = Version - }) - end), + mnesia:dirty_write( + #http_bind{id = Sid, + pid = Pid, + to = {XmppDomain, + XmppVersion}, + hold = Hold, + wait = Wait, + process_delay = Pdelay, + version = Version + }), handle_http_put(Sid, Rid, Attrs, Payload, PayloadSize, true, IP). %%%----------------------------------------------------------------------