@@ -37,7 +37,7 @@ class SseConnection extends StreamChannelMixin<String> {
3737 Timer _keepAliveTimer;
3838
3939 /// Whether this connection is currently in the KeepAlive timeout period.
40- bool get isInKeepAlivePeriod => _keepAliveTimer? .isActive ?? false ;
40+ bool get _isInKeepAlivePeriod => _keepAliveTimer? .isActive ?? false ;
4141
4242 final _closedCompleter = Completer <void >();
4343
@@ -60,7 +60,7 @@ class SseConnection extends StreamChannelMixin<String> {
6060 while (await outgoingStreamQueue.hasNext) {
6161 // If we're in a KeepAlive timeout, there's nowhere to send messages so
6262 // wait a short period and check again.
63- if (isInKeepAlivePeriod ) {
63+ if (_isInKeepAlivePeriod ) {
6464 await Future .delayed (const Duration (milliseconds: 200 ));
6565 continue ;
6666 }
@@ -105,7 +105,7 @@ class SseConnection extends StreamChannelMixin<String> {
105105 if (_keepAlive == null ) {
106106 // Close immediately if we're not keeping alive.
107107 _close ();
108- } else if (! isInKeepAlivePeriod ) {
108+ } else if (! _isInKeepAlivePeriod ) {
109109 // Otherwise if we didn't already have an active timer, set a timer to
110110 // close after the timeout period. If the connection comes back, this will
111111 // be cancelled and all messages left in the queue tried again.
@@ -155,7 +155,7 @@ class SseHandler {
155155 // Check if we already have a connection for this ID that is in the process
156156 // of timing out (in which case we can reconnect it transparently).
157157 if (_connections[clientId] != null &&
158- _connections[clientId].isInKeepAlivePeriod ) {
158+ _connections[clientId]._isInKeepAlivePeriod ) {
159159 _connections[clientId]._acceptReconnection (sink);
160160 } else {
161161 var connection = SseConnection (sink, keepAlive: _keepAlive);
0 commit comments