I gave this code a go, and it seemed to work fairly well. However, it doesn’t seem to work with the event listeners (so I can’t tell if it fixed my original problem). It didn’t appear to connect, so I had to move the “socket.connect()” from the OpenSocket method, and into the “SomeMethod” instead, using “iAmActuallyDisposed.connect()”
Now, it does connect, but none of the event listeners are triggering, such as onOpen etc.
Any ideas?