We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if I have some runtime error in hooks(OnConnect function or any other), this program will abort so how to save program not abort
package main import ( "github.com/gin-gonic/gin" "github.com/gorilla/websocket" "github.com/kataras/neffos" "github.com/kataras/neffos/gorilla" "net/http" ) const ( namespace = "default" timeout = 0 // 30 * time.Second ) var handler = neffos.WithTimeout{ ReadTimeout: timeout, WriteTimeout: timeout, Namespaces: neffos.Namespaces{ namespace: neffos.Events{}, }, } func main() { upgrader := gorilla.Upgrader(websocket.Upgrader{CheckOrigin: func(r *http.Request) bool { return true }}) server(upgrader) } func server(upgrader neffos.Upgrader) { srv := neffos.New(upgrader, handler) srv.OnConnect = func(c *neffos.Conn) error { var i *int *i = 1 // this process will abort at this // so how to continue and recover process return nil } app := gin.New() app.GET("/echo", gin.WrapH(srv)) app.Run() }
The text was updated successfully, but these errors were encountered:
kataras
No branches or pull requests
if I have some runtime error in hooks(OnConnect function or any other), this program will abort
so how to save program not abort
The text was updated successfully, but these errors were encountered: