Skip to content

Commit

Permalink
Merge pull request #113 from AndruhovSasha/master
Browse files Browse the repository at this point in the history
Added pingInterval to copyWidth
  • Loading branch information
KammererTob authored Feb 7, 2025
2 parents 5240098 + 9afe566 commit 4cda9fe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/src/connect_io.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Future<WebSocketChannel> connect(StompConfig config) async {
config.connectUrl,
headers: config.webSocketConnectHeaders,
);

if (config.connectionTimeout.inMilliseconds > 0) {
webSocketFuture = webSocketFuture.timeout(config.connectionTimeout);
}
Expand Down
8 changes: 4 additions & 4 deletions lib/src/stomp_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,7 @@ class StompConfig {
final StompDebugCallback onDebugMessage;

/// The transport url of the WebSocket to connect to
String get connectUrl =>
_connectUrl ??= useSockJS ? SockJsUtils().generateTransportUrl(url) : url;
String get connectUrl => _connectUrl ??= useSockJS ? SockJsUtils().generateTransportUrl(url) : url;

String? _connectUrl;

Expand Down Expand Up @@ -128,6 +127,7 @@ class StompConfig {
Duration? heartbeatIncoming,
Duration? heartbeatOutgoing,
Duration? connectionTimeout,
Duration? pingInterval,
bool? useSockJS,
Map<String, String>? stompConnectHeaders,
Map<String, dynamic>? webSocketConnectHeaders,
Expand All @@ -148,9 +148,9 @@ class StompConfig {
heartbeatIncoming: heartbeatIncoming ?? this.heartbeatIncoming,
heartbeatOutgoing: heartbeatOutgoing ?? this.heartbeatOutgoing,
connectionTimeout: connectionTimeout ?? this.connectionTimeout,
pingInterval: pingInterval ?? this.pingInterval,
useSockJS: useSockJS ?? this.useSockJS,
webSocketConnectHeaders:
webSocketConnectHeaders ?? this.webSocketConnectHeaders,
webSocketConnectHeaders: webSocketConnectHeaders ?? this.webSocketConnectHeaders,
stompConnectHeaders: stompConnectHeaders ?? this.stompConnectHeaders,
beforeConnect: beforeConnect ?? this.beforeConnect,
onConnect: onConnect ?? this.onConnect,
Expand Down

0 comments on commit 4cda9fe

Please sign in to comment.