Hi all
in following code my loop is stuck at c.ReadMessage line for an indefinite time and it will go further if any message is returned but that time is not known let say termination signal comes but loop is stuck at that c.readMessage for indefinite time then how should i terminate the loop which is not moving further
for {
select {
case <-sign:
break
default:
//my loop is stuck at line below this comment
// and sign term gets signal to terminate
msg, _ := c.ReadMessage(-1)
go processMessage(msg)
}