Skip to content

Commit 4cda9fe

Browse files
authored
Merge pull request #113 from AndruhovSasha/master
Added pingInterval to copyWidth
2 parents 5240098 + 9afe566 commit 4cda9fe

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/src/connect_io.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Future<WebSocketChannel> connect(StompConfig config) async {
1212
config.connectUrl,
1313
headers: config.webSocketConnectHeaders,
1414
);
15+
1516
if (config.connectionTimeout.inMilliseconds > 0) {
1617
webSocketFuture = webSocketFuture.timeout(config.connectionTimeout);
1718
}

lib/src/stomp_config.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,7 @@ class StompConfig {
7474
final StompDebugCallback onDebugMessage;
7575

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

8079
String? _connectUrl;
8180

@@ -128,6 +127,7 @@ class StompConfig {
128127
Duration? heartbeatIncoming,
129128
Duration? heartbeatOutgoing,
130129
Duration? connectionTimeout,
130+
Duration? pingInterval,
131131
bool? useSockJS,
132132
Map<String, String>? stompConnectHeaders,
133133
Map<String, dynamic>? webSocketConnectHeaders,
@@ -148,9 +148,9 @@ class StompConfig {
148148
heartbeatIncoming: heartbeatIncoming ?? this.heartbeatIncoming,
149149
heartbeatOutgoing: heartbeatOutgoing ?? this.heartbeatOutgoing,
150150
connectionTimeout: connectionTimeout ?? this.connectionTimeout,
151+
pingInterval: pingInterval ?? this.pingInterval,
151152
useSockJS: useSockJS ?? this.useSockJS,
152-
webSocketConnectHeaders:
153-
webSocketConnectHeaders ?? this.webSocketConnectHeaders,
153+
webSocketConnectHeaders: webSocketConnectHeaders ?? this.webSocketConnectHeaders,
154154
stompConnectHeaders: stompConnectHeaders ?? this.stompConnectHeaders,
155155
beforeConnect: beforeConnect ?? this.beforeConnect,
156156
onConnect: onConnect ?? this.onConnect,

0 commit comments

Comments
 (0)