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,19 +283,16 @@ 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() -> #http_bind{id = Sid,
mnesia:write( pid = Pid,
#http_bind{id = Sid, to = {XmppDomain,
pid = Pid, XmppVersion},
to = {XmppDomain, hold = Hold,
XmppVersion}, wait = Wait,
hold = Hold, process_delay = Pdelay,
wait = Wait, version = Version
process_delay = Pdelay, }),
version = Version
})
end),
handle_http_put(Sid, Rid, Attrs, Payload, PayloadSize, true, IP). handle_http_put(Sid, Rid, Attrs, Payload, PayloadSize, true, IP).
%%%---------------------------------------------------------------------- %%%----------------------------------------------------------------------