File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed 
packages/supabase_flutter/lib/src Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -141,13 +141,21 @@ class SupabaseAuth with WidgetsBindingObserver {
141141
142142        bool  cancel =  false ;
143143        final  connectFuture =  realtime.conn! .sink.done.then (
144-           (_) {
144+           (_) async   {
145145            // Make this connect cancelable so that it does not connect if the 
146146            // disconnect took so long that the app is already in background 
147147            // again. 
148148
149-             // ignore: invalid_use_of_internal_member 
150-             if  (! cancel) return  realtime.connect ();
149+             if  (! cancel) {
150+               // ignore: invalid_use_of_internal_member 
151+               await  realtime.connect ();
152+               for  (final  channel in  realtime.channels) {
153+                 // ignore: invalid_use_of_internal_member 
154+                 if  (channel.isJoined) {
155+                   channel.forceRejoin ();
156+                 }
157+               }
158+             }
151159          },
152160          onError:  (error) {},
153161        );
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments