Skip to content

Commit

Permalink
JdsService | Reduced response timeout for all of the requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Minyewoo committed Apr 11, 2024
1 parent 04c4033 commit 04c7a86
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/src/core/jds_service/jds_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import 'package:hmi_networking/src/core/jds_service/jds_point_config/jds_point_c
///
/// Collection of JDS requests supported by service on external server.
class JdsService {
static const _responceTimeout = Duration(milliseconds: 500);
final DsClient _dsClient;
final PointRoute _route;
///
Expand All @@ -28,6 +29,7 @@ class JdsService {
pointName: _route.join(DsPointName('/Auth.Secret')),
cot: DsCot.req,
responseCots: [DsCot.reqCon, DsCot.reqErr],
responseTimeout: _responceTimeout,
).exec(token)
.onError(
(error, stackTrace) => Err(
Expand All @@ -46,6 +48,7 @@ class JdsService {
pointName: _route.join(DsPointName('/Points')),
cot: DsCot.req,
responseCots: [DsCot.reqCon, DsCot.reqErr],
responseTimeout: _responceTimeout,
).exec('')
.then<ResultF<JdsPointConfigs>>((result) async {
switch(result) {
Expand Down Expand Up @@ -76,6 +79,7 @@ class JdsService {
pointName: _route.join(DsPointName('/Subscribe')),
cot: DsCot.req,
responseCots: [DsCot.reqCon, DsCot.reqErr],
responseTimeout: _responceTimeout,
).exec('[${names.map((name) => '"$name"').join(',')}]')
.onError(
(error, stackTrace) => Err(
Expand Down

0 comments on commit 04c7a86

Please sign in to comment.