How about we use WebSocket status code 4000 for when the relay wants to close the connection and doesn't want the client to try to connect again -- for example, because it requires payment and the client is not a paying user?

Reply to this note

Please Login to reply.

Discussion

That may lead to excluding and kicking out some users permanantly.

What's the different between purple bird and blue bird then?

This already happens with paid relays. It’s different from Twitter because you don’t have a choice over there, but you do over here in regards to which relays you want to use. What he’s suggesting is adding extra information so that clients and relays are smarter and don’t waste resources attempting to connect.

Yes, clients and relays will something like a blacklist or blackmark to prejudge a user and don't service it.

And not everyone can run a relay for himself.

I prefer to block spam bots manually, rather than having facilities for blocking systematicaly.

Just my dime.

I like the idea. Gossip would honor it until restart, most probably. HTTP 402 (payment required) and 403 (forbidden) also seem reasonable.

Looking at my code it wasn't handling HTTP status codes from the relay at all. So I made changes. Now, on many serious errors including unauthorized, forbidden, not found, payment required, etc, gossip doesn't retry.

Sounds good to me 🤷🏻‍♂️