You can’t make the unsubscribe channel buffered. 

On Mar 4, 2025, at 7:55 AM, cpu...@gmail.com <cpui...@gmail.com> wrote:

Thanks Jan, but this just confirms that there is a send on a closed channel. 

It makes me wonder though (far, very far shot): given the map of subscriptions is using the new swissmap, might that be a bug with that? As I've said- very long shot.

Cheers,
Andi

On Tuesday, March 4, 2025 at 2:51:41 PM UTC+1 Jan Mercl wrote:
On Tue, Mar 4, 2025 at 2:41 PM cpu...@gmail.com <cpu...@gmail.com> wrote:

> I've recently run across https://stackoverflow.com/questions/36417199/how-to-broadcast-message-using-channel by icza and tried to use the simple broker in my project.
>
> Unfortunately, it panics with send on closed channel. I couldn't figure out why or where and created a reproducer: https://play.golang.com/p/8hrHf4-nGY2
>
> Can someone spot why this would panic (except for the obvious reason) and how to fix it?

I didn't analyze the code, but maybe this can help:
https://play.golang.com/p/Ix003aXFFul

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/c1a2ed5f-6b94-4acc-8d8f-465131e74651n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/golang-nuts/58D76D5D-7532-4439-B539-3DE30844C3B8%40ix.netcom.com.

Reply via email to