- This topic has 16 replies, 2 voices, and was last updated 2 years, 6 months ago by
kimbomadsen.
-
AuthorPosts
-
-
November 1, 2022 at 17:10 #56725
Babis MichaelParticipantHello,
Changing RequestTimeout value at runtime with indy takes place instantly where with the native transport it has to timeout first.
eg.
Transport.RequestTimeout := 0; // Let current Requests to timeout now
Sleep(1000); // Wait to apply the transport changes
Client.Disconnect;Indy timeouts instantly where native transport still waiting the old value (30 seconds) for the active connections.
IOW, i’m trying to disconnect all active connections instantly with native transport.Any ideas ?
Thank you
-
This topic was modified 3 years, 1 month ago by
Babis Michael.
-
This topic was modified 3 years, 1 month ago by
-
November 5, 2022 at 00:56 #56741
kimbomadsen
KeymasterHi,
I suppose you are talking about Indy Client messaging transport vs native Client messaging transport?
/Kim
-
November 5, 2022 at 09:30 #56743
Babis MichaelParticipantYes, i’m using the messaging transport.
IOW, i want to kill all active connections/requests instantly and not wait to timeout.Thank you
-
November 5, 2022 at 14:27 #56744
Babis MichaelParticipantthe native messaging! with the indy messaging i do this with the code on the first post!
Thank you
-
November 5, 2022 at 23:15 #56745
kimbomadsen
KeymasterWhen using messaging for request/response, it is in reality not the transport that is blocking since that is by definition non blocking, and in the native transports even more so (since the none blocking appearance is simulated using Indy which internally really _is_ blocking…. confused?? 🙂 )
But what is really blocking it is the TkbmMWCustomClient (and its descendants), who will ask the transport to maintain a list of outstanding requests and await the response of the one matching the client’s current request.
You can hook into the wait behaviour via the client event OnClientWaitingResponse.
You will be getting info in the arguments about how long time is left waiting for the client, roughly 10 times a second.You will also be able to set the AAbort argument to true, in which case the wait will immediately stop.
So you could add this line to the event:
AAbort:=Application.Terminated;
Then the client will not await any responses from the server if the application is being shut down.
/Kim
-
-
-
-
November 7, 2022 at 10:42 #56747
Babis MichaelParticipantThank you i’ll give it a try 🙂
-
November 7, 2022 at 11:44 #56749
kimbomadsen
KeymasterI will in the fix release also provide a new global kbmMWShutdown method, which will be used for signalling all long running parts of kbmMW to shut down as soon as possible.
/Kim
-
November 7, 2022 at 14:28 #56751
Babis MichaelParticipantnice 🙂
-
-
January 6, 2023 at 23:48 #56919
Babis MichaelParticipantKim,
OnClientWaitingResponse AAbort stopped working in 5.21!
After the server disconnects i get a TRANSPORT_PROCESSOR_EXCEPTION: Access violation at address 0195F414 in module ‘myapp.exe’. Read of address 00000000 and it doesn’t timeout. (Native Transport)It seems the transport is trying to transfer data on a disconnected session.
Thank you
-
January 7, 2023 at 03:22 #56920
Babis MichaelParticipantMaybe it’s related to the error i get in the client when i terminate the server: EkbmMWSocket ‘Cannot execute StopLoop in IO thread’
-
January 7, 2023 at 07:43 #56921
Babis MichaelParticipantSeems Transport Disconnection isn’t working reverting back to 5.20 solved the problem!
-
January 10, 2023 at 21:04 #56940
Babis MichaelParticipantKim,
Any news on this ?
I think it’s related to “native transport 5.21 TLS disconnect crash” topic too-
This reply was modified 2 years, 11 months ago by
Babis Michael.
-
This reply was modified 2 years, 11 months ago by
-
January 10, 2023 at 21:21 #56942
kimbomadsen
KeymasterIs it possible to make a small sample provoking the error?
I do not see that problem while shutting down my own applications using latest kbmMW.
So probably there is a difference (one difference is that I do not use SSL in the most acticely worked on applications. I instead use AES256 directly of various reasons)./Kim
-
January 10, 2023 at 22:11 #56944
Babis MichaelParticipantSending you via email because here the link thinks it is spam.
-
January 11, 2023 at 01:01 #56945
kimbomadsen
KeymasterThanks! Received it. I will check it out!
/Kim
-
February 27, 2023 at 11:52 #57011
Babis MichaelParticipantHi Kim,
Any news on the fixes ?Thank you
-
-
-
-
June 10, 2023 at 20:54 #57174
kimbomadsen
KeymasterI have had a look at it.
To fix the disconnection issue do the following:At line 352 in kbmMWTCPMessagingClientTransport.pas, add line:
if not FConnection.IsClosed then
before
FConnection.Close;
Remove line 362 in the same unit. The line reads:
InternalCloseSocket;
/Kim
-
-
AuthorPosts
- You must be logged in to reply to this topic.
