vibesurf 0.1.21__py3-none-any.whl → 0.1.23__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of vibesurf might be problematic. Click here for more details.

@@ -653,11 +653,37 @@ class VibeSurfSessionManager {
653
653
 
654
654
  // Cleanup
655
655
  destroy() {
656
- this.stopActivityPolling();
657
- this.eventListeners.clear();
658
- this.currentSession = null;
659
- this.activityLogs = [];
656
+ // Prevent multiple cleanup calls
657
+ if (this.isDestroying) {
658
+ console.log('[SessionManager] Cleanup already in progress, skipping...');
659
+ return;
660
+ }
660
661
 
662
+ this.isDestroying = true;
663
+ console.log('[SessionManager] Destroying session manager...');
664
+
665
+ try {
666
+ this.stopActivityPolling();
667
+ this.eventListeners.clear();
668
+
669
+ // Clear any ongoing requests
670
+ if (this.pollingTimer) {
671
+ clearTimeout(this.pollingTimer);
672
+ this.pollingTimer = null;
673
+ }
674
+
675
+ // Reset state
676
+ this.currentSession = null;
677
+ this.currentTaskId = null;
678
+ this.activityLogs = [];
679
+ this.isPolling = false;
680
+
681
+ console.log('[SessionManager] Session manager cleanup complete');
682
+ } catch (error) {
683
+ console.error('[SessionManager] Error during destroy:', error);
684
+ } finally {
685
+ this.isDestroying = false;
686
+ }
661
687
  }
662
688
 
663
689
  // Status helpers