Browse files

Fixed event stuff.

  • Loading branch information...
1 parent 0bf3501 commit 4d4a91345dabc593734167ec7411425bd6ff94e5 @Licenser Licenser committed Jun 8, 2012
Showing with 7 additions and 3 deletions.
  1. +1 −1 apps/wiggle/priv/js/snarl.js
  2. +6 −2 apps/wiggle/src/wiggle_events.erl
View
2 apps/wiggle/priv/js/snarl.js
@@ -1,7 +1,7 @@
-var permissions = new Object();
var snarl = new Object();
var debug;
!function ($){
+ var permissions = new Object();
permissions.data = new Object();
var selected;
var vm_permissions = {
View
8 apps/wiggle/src/wiggle_events.erl
@@ -40,8 +40,12 @@ websocket_handle({text, JSON}, Req, State) ->
case proplists:get_value(<<"action">>, Data) of
<<"subscribe">> ->
io:format("subscribe: ~s.~n", [UUID]),
- gproc:reg({p, g, {vm,UUID}})
-
+ try
+ gproc:reg({p, g, {vm,UUID}})
+ catch
+ _:_ ->
+ ok
+ end
end,
{ok, Req, State};

0 comments on commit 4d4a913

Please sign in to comment.