connect event dispatch check only redispatches when it's ON the EDT, but NOT in the correct one
This commit is contained in:
parent
e9f7172b62
commit
3852677feb
|
@ -471,7 +471,9 @@ open class Client<CONNECTION : Connection>(
|
|||
|
||||
// on the client, we must GUARANTEE that the disconnect/close completes before NEW connect begins.
|
||||
// we will know this if we are running inside an INTERNAL dispatch that is NOT the connect dispatcher!
|
||||
if (EventDispatcher.getCurrentEvent() != EventDispatcher.CONNECT) {
|
||||
val currentEvent = EventDispatcher.getCurrentEvent()
|
||||
if (currentEvent != null && currentEvent != EventDispatcher.CONNECT) {
|
||||
// only re-dispatch if we are on the event dispatch AND it's not the CONNECT one
|
||||
EventDispatcher.CONNECT.launch {
|
||||
connect(
|
||||
remoteAddress = remoteAddress,
|
||||
|
|
Loading…
Reference in New Issue