walletconnect-monorepo icon indicating copy to clipboard operation
walletconnect-monorepo copied to clipboard

Removed socket response for empty message

Open gigajuwels opened this issue 2 years ago • 4 comments

This PR removes the socket response when a blank message is received. This is more performant and since there is no outbound data for bad messages and ping packets can also be handled somewhat gracefully.

gigajuwels avatar May 09 '22 03:05 gigajuwels

Hello Julia,

I was not capable of reproducing the comment that says: // this gets triggered by web sockets that send ping packets As you can see with the following:

➜ npx wscat -P --slash --connect ws://localhost:8080
Connected (press CTRL+C to quit)
> /ping
< Received pong
< Received ping
> /ping
< Received pong
< Received ping
>
< Missing or invalid socket data
> a
< Socket message is invalid
< Received ping
< Received ping
< Received ping
>

I like the idea of removing a message response when the message is empty

sbc64 avatar May 09 '22 16:05 sbc64

This specific issue was found in C#'s keepalive implementation, it sends a blank message instead of a ping which seems odd.

I'll send an example sometime today

gigajuwels avatar May 09 '22 17:05 gigajuwels

image I was actually able to reproduce on the production bridge server. Can you confirm this is the right place for this change?

gigajuwels avatar May 09 '22 18:05 gigajuwels

I managed to reproduce this against the deployed infrastructure. Again, thanks for looking into this. The Missing or invalid socket data needs to be fixed in another location related with the new infrastructure: https://medium.com/walletconnect/walletconnect-v1-0-infrastructure-improvements-620c3b805026

We will fix this soon and after it is fixed I will close this PR. Although next time this should be an issue.

sbc64 avatar May 09 '22 19:05 sbc64

@gigajuwels is this still an issue?

arein avatar Dec 06 '22 07:12 arein

Closing as stale. servers/relay has been removed in the meantime in favour of our newer Rust relay (OSS TBD)

bkrem avatar Jan 25 '23 09:01 bkrem