I would also like moving all of the deletes above the onDisconnect trigger, but this is a general problem which applies equally to the dev branch.

Fortunately, like all the other deleted fields as far as I can tell, pingLoopId isn't set synchronously in connection.start, so we're safe for now.

activePings gets cleared on stop, so I don't see any reason to reset that. If activePings is ever not empty while the connection is disconnected, that should help us quickly track down the bug, because that should never happen.

I also don't see any compelling reason to reset nextPingId to zero.