Open andybin-cdc opened 4 years ago
You have to invalidate that timer in your code
@hewigovens Thank you for your reply, but the "sessionTimer" is private. WCInteractor.swift#L47
oh, I forget to mention WCSessionStore.store
, timer will be ignored for existing session: https://github.com/trustwallet/wallet-connect-swift/blob/master/WalletConnect/WCInteractor.swift#L227
@hewigovens Thank you for your help! I resolved my problem. I store the session into the WCSessionStore, before every time connect to the Approved Session.
Hi, @hewigovens, I wanna use WCSessionStore to manager my sessions, but when WCInteractor disconnect or deinit the session will be remove from WCSessionStore WCInteractor.swift#L109, I think this behavior is a little confusing.
maybe it makes more sense to remove sessions in "killSession"? WCInteractor.swift#L135 or just let the user decide when to remove from WCSessionStore, Because this is added to the WCSessionStore by user.
When attempting to connect to an approved session, the server will never send the "wc_sessionRequest" method. But the "sessionTimer" is still running, and Eventually I'll get a "sessionRequestTimeout" exception. WCInteractor.swift#L235