[Multiplayer]Another room leaving issue

0 favourites
  • 3 posts
From the Asset Store
A complete set of graphical user interface (GUI) to build 2D video games. With wood, nature, & jungle theme
  • Ashley

    I'm still working on my lobby/new-room scenario/tutorial and have discovered an issue. If I Send a message (in Reliable mode) that triggers the room-switching to occur, and immediately follow it with a 'Leave room' action, this will trigger an error in the host console log:

    Too many errors (10) sending data on 'u' to 'BHT', kicking; last error was for sending 7-char string:

    DOMException {message: "Failed to execute 'send' on 'RTCDataChannel': Could not send data", name: "NetworkError", code: 19, stack: "Error: Failed to execute 'send' on 'RTCDataChannel…43:8)↵ at http://localhost:50003/c2mp.js:148:9", INDEX_SIZE_ERR: 1…}

    c2mp-peer.js:446

    If I add a slight delay after the Send and before the Leave, then everything is fine. I'm guessing this is related to the 'reliable' mechanism needing to confirm the communications, which is an asynchronous task, but since the room is left before the Send has finished, the error is reported.

    My question then; is there a way to detect when any pending sends have completed such that I can then call the Leave action to cleanly perform this task?

    Thanks.

    (r167.2)

  • bump

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • bump

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)