26
1
mirror of https://github.com/processone/ejabberd.git synced 2024-12-26 17:38:45 +01:00

Get rid of useless mnesia transaction (EJAB-1502)

This commit is contained in:
Evgeniy Khramtsov 2011-10-14 16:57:51 +10:00
parent c1d479f863
commit 96800e9b75

View File

@ -283,9 +283,7 @@ handle_session_start(Pid, XmppDomain, Sid, Rid, Attrs,
end, end,
XmppVersion = xml:get_attr_s("xmpp:version", Attrs), XmppVersion = xml:get_attr_s("xmpp:version", Attrs),
?DEBUG("Create session: ~p", [Sid]), ?DEBUG("Create session: ~p", [Sid]),
mnesia:transaction( mnesia:dirty_write(
fun() ->
mnesia:write(
#http_bind{id = Sid, #http_bind{id = Sid,
pid = Pid, pid = Pid,
to = {XmppDomain, to = {XmppDomain,
@ -294,8 +292,7 @@ handle_session_start(Pid, XmppDomain, Sid, Rid, Attrs,
wait = Wait, wait = Wait,
process_delay = Pdelay, process_delay = Pdelay,
version = Version version = Version
}) }),
end),
handle_http_put(Sid, Rid, Attrs, Payload, PayloadSize, true, IP). handle_http_put(Sid, Rid, Attrs, Payload, PayloadSize, true, IP).
%%%---------------------------------------------------------------------- %%%----------------------------------------------------------------------