diff --git a/cmd/iface/main.go b/cmd/iface/main.go index 81beec3..dc68dea 100644 --- a/cmd/iface/main.go +++ b/cmd/iface/main.go @@ -17,6 +17,12 @@ func main(){ /* (2) Bind default controller */ serv.BindDefault(func(cli *ws.Client, receiver <-chan ws.Message, sender chan<- ws.Message, bc chan<- ws.Message){ + defer func(){ + if (recover() != nil) { + fmt.Printf("*** PANIC\n") + } + }() + for msg := range receiver { // if receive message -> send it back