Maxim Sokhatsky 11 лет назад
Родитель
Сommit
9306800551

+ 4 - 0
apps/server/src/game_session.erl

@@ -413,11 +413,15 @@ handle_relay_message(Msg, _SubscrId, #state{rpc = RPC} = State) ->
         ok ->
             {noreply, State};
         tcp_closed ->
+            {stop, normal, State};
+        E -> error_logger:info_msg("ERROR SEND MESSAGE TO PLAYER: ~p",[E]),
             {stop, normal, State}
     catch
         exit:{normal, {gen_server,call, [RPC, {send_message, _}]}} ->
             {stop, normal, State};
         exit:{noproc, {gen_server,call, [RPC, {send_message, _}]}} ->
+            {stop, normal, State};
+        E:R ->
             {stop, normal, State}
     end.
 

+ 2 - 0
apps/server/src/okey/game_okey_bot.erl

@@ -104,6 +104,8 @@ handle_info({'DOWN', Ref, process, _, Reason},
     ?INFO
     ("relay goes down with reason ~p so does bot", [Reason]),
     {stop, Reason, State};
+handle_info({send_message,M}, State) ->
+    {noreply, State};
 handle_info(Info, State) ->
     {stop, {unrecognized_info, Info}, State}.
 

+ 2 - 0
apps/server/src/tavla/game_tavla_bot.erl

@@ -111,6 +111,8 @@ handle_cast(Msg, State) ->
 handle_info({'DOWN', Ref, process, _, Reason}, State = #state{owner_mon = OMon}) when OMon == Ref ->
     ?INFO("relay goes down with reason ~p so does bot", [Reason]),
     {stop, Reason, State};
+handle_info({send_message,M}, State) ->
+    {noreply, State};
 handle_info(Info, State) ->
     {stop, {unrecognized_info, Info}, State}.