What is exactly the problem? Do you need to ignore an AsyncStream_Terminated event?
You should not reuse any socket or asyncstream object. You should instead create a new object (by calling Dim again) and use new objects.
Suppose you have 10 clients. You establish connection with the first. Let's now dim socket and streams for this one. Their index is 1, for now. In a while we have a new connection, name it 2 (both socket and stream).
Here's the catch: At some point client1 after finishing the process, is free again. So, I am setting a variable telling that socket1 (please remember that I'm using arrays, cause I can have up to 100 clients in this e.r.p). is free again for reuse. The same goes for streams(1). Ok. The thing is at that very same moment, another client may connect. Now, this client can get the socket client1 was using. This is NO problem at all. The problem is if it tries to use aStreams1. If it does, we're getting the old aStreams1 delayed terminated event, thus the new connection breaks!
Now, your suggestion for re-dimming sockets and streams, is one I will try very soon. Please note that this was one of my first projects, and I didn't see back then the necessity of re-dimming this type of objects, since I was re-initializing them. Even now, I really don't understand quite well, why I should re-dim an already closed object instead of simply re-initializing it. I remember having a look at b4a-bridge. In the new Connection sub, there was a re-dimming if streams, though client socket was not redimmed. Probably cause there was no other client involved.
Anyway, as already said, now I'm quite happy with how I handle streams (in fact my previous post was just to show the log that got me into changing stuff), but surely I will try simply redimming sockets and streams, thank you.