Maxim Sokhatsky 11 лет назад
Родитель
Сommit
9b83c02f2f
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      apps/server/src/game_session.erl

+ 5 - 1
apps/server/src/game_session.erl

@@ -101,7 +101,11 @@ register_user_by_module(RPC,User,GameId,#state{games=Games} = State) ->
                 {error, not_allowed} ->
                     gas:error(?MODULE,"Not allowed to connect: ~p.",[GameId]),
                     ok = send_message_to_player(RPC, #disconnect{reason_id = <<"notAllowed">>,reason = null}),
-                    {reply, {error, not_allowed}, State}
+                    {reply, {error, not_allowed}, State};
+                {error, UnknownError} ->
+                    gas:error(?MODULE,"Unknown Registration Error: ~p.",[GameId]),
+                    ok = send_message_to_player(RPC, #disconnect{reason_id = term_to_binary(UnknownError),reason = null}),
+                    {reply, {error, UnknownError}, State}
             end;
         undefined ->
             gas:error(?MODULE,"Game not found: ~p.",[GameId]),