lib/isomorfeus/ssr.rb in isomorfeus-preact-10.6.44 vs lib/isomorfeus/ssr.rb in isomorfeus-preact-10.6.45

- old
+ new

@@ -79,7 +79,16 @@ self.store_busy = function() { let nfp = global.Opal.Isomorfeus.store["$recently_dispatched?"](); return (nfp == global.Opal.nil) ? false : nfp; } } + + def self.disconnect_transport + Isomorfeus::Transport::RequestAgent.agents.each do |agent_id, agent| + agent.promise.reject() unless agent.promise.realized? + Isomorfeus::Transport::RequestAgent.del!(agent_id) + end + Isomorfeus::Transport.instance_variable_set(:@requests_in_progress, { requests: {}, agent_ids: {} }) + Isomorfeus::Transport.disconnect + end end end \ No newline at end of file