Jump to content

gsachs

Members
  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral
  1. I understand that finalizing the current version has priority. Here is a wireshark file that shows whats happening on ethernet, I filtered just the interesting packets. The remote machine on 10.10.10.123 was already running. Then I started the server application in a VM while debugging. I waited until it showed that the connection was established then I closed the app, which led to the exception. Gerhard IMS30_CS.pcapng
  2. The demo TCP server does not have this problem. It is neither freed nor closed nor disconnected but the app works and closes without crash. Maybe I'm doing much too much by first disconnecting, then closing, then freeing. Is there a preferred way to close an application while the remote client is still running ?
  3. I have an application where a remote client is connected to WSocket Server. On program close I want to disconnect all clients before the server is freed. The DisconnectAll routine throws an access violation exception. In the DisconnectAll there is a loop to disconnect all clients and the loop counter is a property of the TCustomWSocketServer. It is read by the function GetClientCount which in turn returns the FClientList.Count property. Should work normally but the ClientCount does not change., in my case it stays at 1. The first loop is ok, the second crashes. In the Disconnect routine WClientClosed is called where the client is freed. The comment there tells what should happen, but obviously it does not. { Calling Free will automatically remove client from list } { because we installed a notification handler. } When I disconnect the clients one by one the client count exception is gone but in my FormClose routine I got another access violation exception. This time at the line 'if operation = opRemove' below. {* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *} procedure TCustomSslWSocket.Notification(AComponent: TComponent; operation: TOperation); begin inherited Notification(AComponent, operation); if operation = opRemove then begin if AComponent = FSslContext then FSslContext := nil; end; end; Delphi 13 32Bit on W11, ICS 9.5 VCL only installed from Getit. Does anybody have an idea to solve this ?
×