File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
src/modules/public/dota_rp_flow Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -780,17 +780,20 @@ async def conclude_friend_match(self, friend: Friend) -> None:
780780 (match := friend .active_match )
781781 and isinstance (match , PlayingMatch )
782782 and match .match_id
783- and match .live == LiveIndicator .Live
784783 ):
785- match .live = LiveIndicator .Pending
786- query = """
787- UPDATE ttv_dota_matches
788- SET live = $1
789- WHERE match_id = $2;
790- """
791- await self .bot .pool .execute (query , LiveIndicator .Pending , match .match_id )
792- if not self .process_pending_matches .is_running ():
793- self .process_pending_matches .start ()
784+ if match .live == LiveIndicator .Live :
785+ match .live = LiveIndicator .Pending
786+ query = """
787+ UPDATE ttv_dota_matches
788+ SET live = $1
789+ WHERE match_id = $2;
790+ """
791+ await self .bot .pool .execute (query , LiveIndicator .Pending , match .match_id )
792+ if not self .process_pending_matches .is_running ():
793+ self .process_pending_matches .start ()
794+ elif match .live == LiveIndicator .Starting :
795+ # It means that the lobby terminated before heroes were picked;
796+ match .update_data .cancel ()
794797
795798 friend .active_match = None
796799
You can’t perform that action at this time.
0 commit comments