shamblett / coap

A Coap package for dart
Other
16 stars 13 forks source link

Events stop after successful events #45

Closed kwekel closed 2 years ago

kwekel commented 2 years ago

Hi,

for the project I'm building I want to subscribe to events. I'm using this coap package with version 3.2.1. After about 10 successful events the events suddenly stop coming in. In a python script I'm using next to my project, the events do keep coming in. So the problem seems to be with either my dart code or possibly with this package.

My coap_config.yaml file is exactly the same as in the example. This is my dart code:

  observeCoap() async {
    var conf = CoapConfig();
    connectedHost = CoapClient(Uri(
      scheme: 'coap', 
      host:  '10.0.1.220',
      port: conf.defaultPort,
    ), 
    conf); 

    final CoapRequest request = CoapRequest.newGet();
    request.addUriPath('Json');
    request.markObserve();

    request.responses.listen((data) {
      print(data);
    });

    connectedHost!.request = request;

    await connectedHost!.get();
  }

I understand that it's hard to test this without having access to my testhardware, however does anyone else have this problem? And is there perhaps a test server that sends frequent events to the subscribers to test? I think this may be a problem with the ack message, but I'm not sure.

Thanks

shamblett commented 2 years ago

Could you provide a log from the client showing the error, probably only need the from the last successful message received onwards.

kwekel commented 2 years ago

The log does not show an error. I just seems to skip some events. This is the log:

flutter: 2021-12-09 08:39:56.375: INFO: >> Matcher - cleaning up KeyID[22115]) flutter: 2021-12-09 08:39:56.376: INFO: >> Reliability - Response is confirmable, send ACK. I/flutter (12519): 2021-12-09 08:39:53.790: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:40:04.463: INFO: >> Start Mark-And-Sweep with 1 entries flutter: 2021-12-09 08:40:04.463: INFO: >> Mark-And-Sweep removes KeyID[1089]) I/flutter (12519): 2021-12-09 08:40:03.787: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:40:05.259: INFO: >> Matcher - received response I/flutter (12519): <<< Response Message >>> I/flutter (12519): Type: 0, Code: 2.05 Content, Id: 30924, Token: 00001e8c, I/flutter (12519): Options = I/flutter (12519): [ I/flutter (12519): If-Match : I/flutter (12519): Uri Host : None I/flutter (12519): E-tags : ETag: e8d33941 I/flutter (12519): None I/flutter (12519): Uri Port : None I/flutter (12519): Location Paths: I/flutter (12519): Uri Paths : I/flutter (12519): Content-Type : 50 I/flutter (12519): Max Age : 0 I/flutter (12519): Uri Queries : I/flutter (12519): Accept : -1 I/flutter (12519): Location Queries : I/flutter (12519): Proxy Uri : None I/flutter (12519): Proxy Scheme : None I/flutter (12519): Block 1 : None I/flutter (12519): Block 2 : None I/flutter (12519): Observe : 103 I/flutter (12519): Size 1 : 0 I/flutter (12519): Size 2 : 0 I/flutter (12519): ], I/flutter (12519): Payload : I/flutter (12519): {"id":null,"method":"rset","params":{"name":"modbus.1109","value":91}} I/flutter (12519): 2021-12-09 08:40:05.261: INFO: >> Matcher - cleaning up KeyID[3646]) I/flutter (12519): 2021-12-09 08:40:05.262: INFO: >> Reliability - Response is confirmable, send ACK. flutter: 2021-12-09 08:40:14.462: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:40:13.783: INFO: >> Start Mark-And-Sweep with 1 entries I/flutter (12519): 2021-12-09 08:40:13.786: INFO: >> Mark-And-Sweep removes KeyID[30924]) flutter: 2021-12-09 08:40:24.462: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:40:23.791: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:40:34.462: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:40:33.783: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:40:44.457: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:40:43.791: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:40:54.461: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:40:53.786: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:41:04.461: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:41:03.783: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:41:14.459: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:41:13.781: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:41:24.459: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:41:23.790: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:41:34.458: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:41:33.783: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:41:44.459: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:41:43.791: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:41:54.457: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:41:53.783: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:42:04.459: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:42:03.783: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:42:14.458: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:42:13.783: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:42:24.459: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:42:23.791: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:42:34.458: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:42:33.790: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:42:44.458: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:42:43.790: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:42:54.454: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:42:53.783: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:43:04.455: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:43:03.782: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:43:14.456: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:43:13.791: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:43:24.457: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:43:23.790: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:43:34.456: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:43:33.789: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:43:44.456: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:43:43.791: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:43:54.456: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:43:53.783: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:44:04.455: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:44:03.785: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:44:14.455: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:44:13.783: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:44:24.455: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:44:23.791: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:44:34.455: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:44:33.782: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:44:44.450: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:44:43.789: INFO: >> Start Mark-And-Sweep with 0 entries flutter: 2021-12-09 08:44:54.454: INFO: >> Start Mark-And-Sweep with 0 entries I/flutter (12519): 2021-12-09 08:44:53.791: INFO: >> Start Mark-And-Sweep with 0 entries

Btw I changed to coap version 3.3.0

shamblett commented 2 years ago

What do you mean by 'event' and 'skip some'? Do you mean the client is receiving a message and logging it but the message is not appearing in your listen code or do you mean some other process is saying that a message has been received but it is not present in the client log. This transport is UDP as you know, there is no guaranteed delivery here.

kwekel commented 2 years ago

By event I simply mean a message sent by the server to the client based on the client being subscribed. And I mean some other process is saying that a message has been received but it is not present in the client log. I get that there's no guaranteed delivery, but at times it fails to receive a lot of events. In the python script it does receive the events.

shamblett commented 2 years ago

OK, but as you know the COAP package depends on the Dart/Flutter runtime to pass it received UDP messages, if this doesn't happen then there is nothing the client can do. I don't know how you would find this out however.

When it stops does it stop completely or does it start again and when it starts are the received events current, i.e. is the first message current at that time or is it an older queued one?

kwekel commented 2 years ago

Yes, it stops completely. Then it starts logging these messages:

flutter: 2021-12-09 11:48:55.651: INFO: >> Start Mark-And-Sweep with 0 entries

shamblett commented 2 years ago

Do any of the Mark and Sweep entries appear when the test is working? Does the test stop working after the first Mark and Sweep entry is logged?

In the examples directory I have .NET based server and a number of tests written in Dart, when I run the server on my windows box and start the the time_obs_resoiurce.dart test against this server it seems to work -

D:/Development/google/dart/dart-sdk/bin/dart.exe --enable-asserts D:\Development\google\dart\projects\coap\example\testserver-example\time_obs_resource.dart
EXAMPLE - Sending get observable request to localhost, waiting for responses ....
2021-12-09 15:32:47.758: INFO: >> Sending request in namespace ""
2021-12-09 15:32:47.805: SEVERE: >> BlockwiseLayer uses MaxMessageSize: 1024 and DefaultBlockSize: 512
2021-12-09 15:32:47.805: INFO: >> CoapNetworkUDP - binding to 0.0.0.0
2021-12-09 15:32:47.820: INFO: >> Starting endpoint bound to InternetAddress('127.0.0.1', IPv4)
2021-12-09 15:32:47.836: INFO: >> Reliability - Scheduling transmission for 
<<< Request Message >>>
Type: 0, Code: GET, Id: 4154, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : 5683
Location Paths: 
Uri Paths : time
Content-Type : None
Max Age : None
Uri Queries : 
Accept : None
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 0
Size 1 : 0
Size 2 : 0
], 
Payload :
null
2021-12-09 15:32:47.836: INFO: >> Reliability - sending request, failed transmission count: 0
2021-12-09 15:32:47.836: INFO: >> Reliability - Retransmission timeout is 3697 ms
2021-12-09 15:32:47.836: INFO: >> Matcher - Stored open request by KeyID[4154]) + KeyToken[0000210e]
2021-12-09 15:32:47.914: INFO: >> Matcher - received response 
<<< Response Message >>> 
Type: 2, Code: 2.05 Content, Id: 4154, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : None
Location Paths: 
Uri Paths : 
Content-Type : 0
Max Age : None
Uri Queries : 
Accept : -1
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 6
Size 1 : 0
Size 2 : 0
], 
Payload :
09/12/2021 15:32:47
2021-12-09 15:32:47.914: INFO: >> Matcher - cleaning up KeyID[4154])
2021-12-09 15:32:47.914: INFO: >> Reliability - Cancel retransmission for token: 0000210e id: 4154
2021-12-09 15:32:49.170: INFO: >> Matcher - received response 
<<< Response Message >>> 
Type: 1, Code: 2.05 Content, Id: 59360, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : None
Location Paths: 
Uri Paths : 
Content-Type : 0
Max Age : None
Uri Queries : 
Accept : -1
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 7
Size 1 : 0
Size 2 : 0
], 
Payload :
09/12/2021 15:32:49
2021-12-09 15:32:49.170: INFO: >> Matcher - cleaning up KeyID[4154])
EXAMPLE - payload: 09/12/2021 15:32:49
2021-12-09 15:32:51.172: INFO: >> Matcher - received response 
<<< Response Message >>> 
Type: 1, Code: 2.05 Content, Id: 59361, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : None
Location Paths: 
Uri Paths : 
Content-Type : 0
Max Age : None
Uri Queries : 
Accept : -1
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 8
Size 1 : 0
Size 2 : 0
], 
Payload :
09/12/2021 15:32:51
2021-12-09 15:32:51.172: INFO: >> Matcher - cleaning up KeyID[4154])
EXAMPLE - payload: 09/12/2021 15:32:51
2021-12-09 15:32:53.185: INFO: >> Matcher - received response 
<<< Response Message >>> 
Type: 1, Code: 2.05 Content, Id: 59362, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : None
Location Paths: 
Uri Paths : 
Content-Type : 0
Max Age : None
Uri Queries : 
Accept : -1
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 9
Size 1 : 0
Size 2 : 0
], 
Payload :
09/12/2021 15:32:53
2021-12-09 15:32:53.185: INFO: >> Matcher - cleaning up KeyID[4154])
EXAMPLE - payload: 09/12/2021 15:32:53
2021-12-09 15:32:55.196: INFO: >> Matcher - received response 
<<< Response Message >>> 
Type: 1, Code: 2.05 Content, Id: 59363, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : None
Location Paths: 
Uri Paths : 
Content-Type : 0
Max Age : None
Uri Queries : 
Accept : -1
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 10
Size 1 : 0
Size 2 : 0
], 
Payload :
09/12/2021 15:32:55
2021-12-09 15:32:55.196: INFO: >> Matcher - cleaning up KeyID[4154])
EXAMPLE - payload: 09/12/2021 15:32:55
2021-12-09 15:32:57.209: INFO: >> Matcher - received response 
<<< Response Message >>> 
Type: 1, Code: 2.05 Content, Id: 59364, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : None
Location Paths: 
Uri Paths : 
Content-Type : 0
Max Age : None
Uri Queries : 
Accept : -1
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 11
Size 1 : 0
Size 2 : 0
], 
Payload :
09/12/2021 15:32:57
2021-12-09 15:32:57.209: INFO: >> Matcher - cleaning up KeyID[4154])
EXAMPLE - payload: 09/12/2021 15:32:57
2021-12-09 15:32:57.830: INFO: >> Start Mark-And-Sweep with 6 entries
2021-12-09 15:32:57.830: INFO: >> Mark-And-Sweep removes KeyID[4154])
2021-12-09 15:32:57.830: INFO: >> Mark-And-Sweep removes KeyID[59360])
2021-12-09 15:32:57.830: INFO: >> Mark-And-Sweep removes KeyID[59361])
2021-12-09 15:32:57.830: INFO: >> Mark-And-Sweep removes KeyID[59362])
2021-12-09 15:32:57.830: INFO: >> Mark-And-Sweep removes KeyID[59363])
2021-12-09 15:32:57.830: INFO: >> Mark-And-Sweep removes KeyID[59364])
2021-12-09 15:32:59.224: INFO: >> Matcher - received response 
<<< Response Message >>> 
Type: 1, Code: 2.05 Content, Id: 59365, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : None
Location Paths: 
Uri Paths : 
Content-Type : 0
Max Age : None
Uri Queries : 
Accept : -1
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 12
Size 1 : 0
Size 2 : 0
], 
Payload :
09/12/2021 15:32:59
2021-12-09 15:32:59.224: INFO: >> Matcher - cleaning up KeyID[4154])
EXAMPLE - payload: 09/12/2021 15:32:59
2021-12-09 15:33:01.233: INFO: >> Matcher - received response 
<<< Response Message >>> 
Type: 1, Code: 2.05 Content, Id: 59366, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : None
Location Paths: 
Uri Paths : 
Content-Type : 0
Max Age : None
Uri Queries : 
Accept : -1
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 13
Size 1 : 0
Size 2 : 0
], 
Payload :
09/12/2021 15:33:01
2021-12-09 15:33:01.233: INFO: >> Matcher - cleaning up KeyID[4154])
EXAMPLE - payload: 09/12/2021 15:33:01
2021-12-09 15:33:03.248: INFO: >> Matcher - received response 
<<< Response Message >>> 
Type: 1, Code: 2.05 Content, Id: 59367, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : None
Location Paths: 
Uri Paths : 
Content-Type : 0
Max Age : None
Uri Queries : 
Accept : -1
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 14
Size 1 : 0
Size 2 : 0
], 
Payload :
09/12/2021 15:33:03
2021-12-09 15:33:03.248: INFO: >> Matcher - cleaning up KeyID[4154])
EXAMPLE - payload: 09/12/2021 15:33:03
2021-12-09 15:33:05.252: INFO: >> Matcher - received response 
<<< Response Message >>> 
Type: 1, Code: 2.05 Content, Id: 59368, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : None
Location Paths: 
Uri Paths : 
Content-Type : 0
Max Age : None
Uri Queries : 
Accept : -1
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 15
Size 1 : 0
Size 2 : 0
], 
Payload :
09/12/2021 15:33:05
2021-12-09 15:33:05.252: INFO: >> Matcher - cleaning up KeyID[4154])
EXAMPLE - payload: 09/12/2021 15:33:05
2021-12-09 15:33:07.264: INFO: >> Matcher - received response 
<<< Response Message >>> 
Type: 1, Code: 2.05 Content, Id: 59369, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : None
Location Paths: 
Uri Paths : 
Content-Type : 0
Max Age : None
Uri Queries : 
Accept : -1
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 16
Size 1 : 0
Size 2 : 0
], 
Payload :
09/12/2021 15:33:07
2021-12-09 15:33:07.264: INFO: >> Matcher - cleaning up KeyID[4154])
EXAMPLE - payload: 09/12/2021 15:33:07
2021-12-09 15:33:07.828: INFO: >> Start Mark-And-Sweep with 5 entries
2021-12-09 15:33:07.828: INFO: >> Mark-And-Sweep removes KeyID[59365])
2021-12-09 15:33:07.828: INFO: >> Mark-And-Sweep removes KeyID[59366])
2021-12-09 15:33:07.828: INFO: >> Mark-And-Sweep removes KeyID[59367])
2021-12-09 15:33:07.828: INFO: >> Mark-And-Sweep removes KeyID[59368])
2021-12-09 15:33:07.828: INFO: >> Mark-And-Sweep removes KeyID[59369])
2021-12-09 15:33:09.280: INFO: >> Matcher - received response 
<<< Response Message >>> 
Type: 1, Code: 2.05 Content, Id: 59370, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : None
Location Paths: 
Uri Paths : 
Content-Type : 0
Max Age : None
Uri Queries : 
Accept : -1
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 17
Size 1 : 0
Size 2 : 0
], 
Payload :
09/12/2021 15:33:09
2021-12-09 15:33:09.280: INFO: >> Matcher - cleaning up KeyID[4154])
EXAMPLE - payload: 09/12/2021 15:33:09
2021-12-09 15:33:11.293: INFO: >> Matcher - received response 
<<< Response Message >>> 
Type: 1, Code: 2.05 Content, Id: 59371, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : None
Location Paths: 
Uri Paths : 
Content-Type : 0
Max Age : None
Uri Queries : 
Accept : -1
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 18
Size 1 : 0
Size 2 : 0
], 
Payload :
09/12/2021 15:33:11
2021-12-09 15:33:11.293: INFO: >> Matcher - cleaning up KeyID[4154])
EXAMPLE - payload: 09/12/2021 15:33:11
2021-12-09 15:33:13.314: INFO: >> Matcher - received response 
<<< Response Message >>> 
Type: 1, Code: 2.05 Content, Id: 59372, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : None
Location Paths: 
Uri Paths : 
Content-Type : 0
Max Age : None
Uri Queries : 
Accept : -1
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 19
Size 1 : 0
Size 2 : 0
], 
Payload :
09/12/2021 15:33:13
2021-12-09 15:33:13.314: INFO: >> Matcher - cleaning up KeyID[4154])
EXAMPLE - payload: 09/12/2021 15:33:13
2021-12-09 15:33:15.321: INFO: >> Matcher - received response 
<<< Response Message >>> 
Type: 1, Code: 2.05 Content, Id: 59373, Token: 0000210e, 
Options =
[
If-Match : 
Uri Host : None
E-tags : 
None
Uri Port : None
Location Paths: 
Uri Paths : 
Content-Type : 0
Max Age : None
Uri Queries : 
Accept : -1
Location Queries : 
Proxy Uri : None
Proxy Scheme : None
Block 1 : None
Block 2 : None
Observe : 20
Size 1 : 0
Size 2 : 0
], 
Payload :
09/12/2021 15:33:15
2021-12-09 15:33:15.321: INFO: >> Matcher - cleaning up KeyID[4154])
EXAMPLE - payload: 09/12/2021 15:33:15

Process finished with exit code -1

It seems to run OK for quite a while, I think the code is basically doing the same as yours although ordered a little differently, you could check this. Also the responses are not confirmable so its not quite the same as there are no acks, could you make the responses non confirmable?

kwekel commented 2 years ago

Yes, the mark and sweep messages also appear when the test is working.

Thank you for your help. I'll have a look at the example.

vincent-iQontrol commented 2 years ago

This point is fixed when we use final reqObsNon = CoapRequest(CoapCode.get, confirmable: false);

shamblett commented 2 years ago

Believe this has been addressed. Package re released at version 5.0.0.