During some experiments, I came to a strange error that I don't understand yet.
Put those two folder into seperate sub-folder, of course.
To reproduce
- Open two terminals
- First one:
go run ./producer
- Second one:
go run ./consumer
- They should communicate and trigger events
- CTRL + C on consumer
- Restart it again
- The error should show up
2023/01/06 17:06:25 WARNING! Server terminated <336B493D.0.1011>["producer"]. Panic reason: "invalid memory address or nil pointer dereference" at runtime.panicmem[C:/Program Files/Go/src/runtime/panic.go:260]
I don't know yet why this is happening