WalletConnect / py-walletconnect-bridge

WalletConnect Bridge Python Implementation
GNU Lesser General Public License v3.0
72 stars 22 forks source link

Longpolling not working #25

Closed ligi closed 6 years ago

ligi commented 6 years ago

regarding to this documentation there should be long-polling when getting accounts. But the bridge is instantly answering with a 204 which leads to a very short polling and high traffic - e.g. see this log: https://gist.github.com/ligi/09fa5a672e7810ef83bc0b9b12cfdd2b which i got running https://github.com/balance-io/ethereum-store - there https://walletconnect.balance.io/session/ is GETed in very high frequency

pedrouid commented 6 years ago

I see what you mean, totally missed the point when we were discussing it before. That's correct right now WalletConnect does a short-polling answering with a 204. Do you think that this should be a long-polling instead?

ligi commented 6 years ago

Do you think that this should be a long-polling instead?

The documentation states there is long polling here - and I think it makes sense as getting out the phone, potentially unlocking, opening the app and scanning the QR code might take some time. It would reduce the load on the bridge server and decrease traffic.

pedrouid commented 6 years ago

Sounds good, let's make this change then

pedrouid commented 6 years ago

Discussion: https://discuss.walletconnect.org/t/long-polling-vs-short-polling/53