I have to admit I am confused, but if you get a disconnect request from a client for which there is no established connection you can increment a disconnect counter in a mutex then whenever you complete a connect check for a positive disconnect counter, disconnect, and decrement.
If there is an established connection as indicated by a connection counter in the mutex then disconnect right away. It's kind of like counting parentheses.