Yawnder
Yawnder
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
I'll have to go to bed anywyas, it's already 2:21
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
Alright then!
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
Do you know if it's the streamwriter or the underlying stream that's being disposed? (I know you said Stream, but I just want to confirm)
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
Oh, ok
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
If you inspect, you'll see that this.listener is what's already disposed.
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
Change OnMessage(this.listener.LocalEndpoint, $"{Name} Service Stopped."); to
var aa = this.listener;
var bb = aa.LocalEndpoint;
OnMessage(bb, $"{Name} Service Stopped.");
var aa = this.listener;
var bb = aa.LocalEndpoint;
OnMessage(bb, $"{Name} Service Stopped.");
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
But isn't it what throws the exception?
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
(and it's the .LocalEndpoint that throws)
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
Because what's disposed is this.listener right?
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
@maxmahem
this.listener.Stop(); // <-- You stop it here, then...
OnMessage(this.listener.LocalEndpoint, $"{Name} Service Stopped."); // Use it here?
this.listener.Stop(); // <-- You stop it here, then...
OnMessage(this.listener.LocalEndpoint, $"{Name} Service Stopped."); // Use it here?
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
Also, what is your exception exactly? (just to double check)
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
Can you put a breakpoint with an "on count" condition to stop if there is a 2nd call to StopService?
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
I'm clueless then, sorry
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
Try flushing it after every writeline, just for fun (to remove that from the equation)
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
What's logStream?
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
Often there is some pooling in the logging. So it might run deferred, then crash.
37 replies
CC#
Created by maxmahem on 5/7/2024 in #help
Async events firing out of expected sequence.
@maxmahem Does it happen if this.cancellationTokenSource is not null too? Also, are you saying OnMessage is getting called after, or that the result of OnMessage is received after? What are you basing that on?
37 replies
CC#
Created by eh on 5/1/2024 in #help
Connection Error SQLite and C#
Are you reading what I write?
21 replies
CC#
Created by eh on 5/1/2024 in #help
Connection Error SQLite and C#
You should be using using when creating IDisposable objects.
21 replies
CC#
Created by eh on 5/1/2024 in #help
Connection Error SQLite and C#
But a quick googling just indicates it's what happens if you have a connection left open.
21 replies