File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 2828 * Whether the session should be closed when the event stream begins.
2929 * This is useful to allow other requests to be processed while the event stream is being sent.
3030 */
31- 'shouldCloseSession ' => false ,
31+ 'shouldCloseSession ' => true ,
3232
3333 /**
3434 * The name of the signals variable that will be injected into Datastar templates.
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class Settings extends Model
1818 * Whether the session should be closed when the event stream begins.
1919 * This is useful to allow other requests to be processed while the event stream is being sent.
2020 */
21- public bool $ shouldCloseSession = false ;
21+ public bool $ shouldCloseSession = true ;
2222
2323 /**
2424 * The name of the signals variable that will be injected into Datastar templates.
Original file line number Diff line number Diff line change @@ -79,16 +79,16 @@ public function getEventStream(?callable $callable = null): Response
7979 session_write_close ();
8080 }
8181
82+ if (is_callable ($ callable )) {
83+ $ callable ();
84+ }
85+
8286 echo $ this ->getEventOutput ();
8387 if (ob_get_contents ()) {
8488 ob_flush ();
8589 }
8690 flush ();
8791
88- if (is_callable ($ callable )) {
89- $ callable ();
90- }
91-
9292 // Return an array to prevent Yii from throwing an exception.
9393 return [];
9494 };
You can’t perform that action at this time.
0 commit comments