]> granicus.if.org Git - ejabberd/commitdiff
Get rid of useless mnesia transaction (EJAB-1502)
authorEvgeniy Khramtsov <ekhramtsov@process-one.net>
Fri, 14 Oct 2011 06:57:51 +0000 (16:57 +1000)
committerEvgeniy Khramtsov <ekhramtsov@process-one.net>
Fri, 14 Oct 2011 06:57:51 +0000 (16:57 +1000)
src/web/ejabberd_http_bind.erl

index 6244bf12ff1d68261474605214372240b3bdf659..63b608682b5b2543d9d4a8298dc68bc38f68e500 100644 (file)
@@ -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).
 
 %%%----------------------------------------------------------------------