Golang panic send on closed channel. You can check if a channel is closed using the .