Giter Club home page Giter Club logo

go-pts's People

Contributors

dependabot[bot] avatar mono424 avatar

Stargazers

 avatar  avatar

Watchers

 avatar

go-pts's Issues

invalid memory address or nil pointer dereference in `UnsubscribeAllPaths`

After switching to go-pts we're getting this panic:

live_tumlive.1.8riczi1h9ebr@vmrbg451    | Error during message reading: websocket: close 1001 (going away)
live_tumlive.1.8riczi1h9ebr@vmrbg451    | [GIN] 2022/12/10 - 11:28:10 | 200 |   12.059828ms |      172.18.0.1 | GET      "/w/HM1FMWuCI/21365/SPLIT"
live_tumlive.1.8riczi1h9ebr@vmrbg451    | Error during message reading: websocket: close 1001 (going away)
live_tumlive.1.8riczi1h9ebr@vmrbg451    | panic: runtime error: invalid memory address or nil pointer dereference
live_tumlive.1.8riczi1h9ebr@vmrbg451    | [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xe034b8]
live_tumlive.1.8riczi1h9ebr@vmrbg451    | 
live_tumlive.1.8riczi1h9ebr@vmrbg451    | goroutine 475 [running]:
live_tumlive.1.8riczi1h9ebr@vmrbg451    | github.com/joschahenningsen/TUM-Live/api.liveUpdateOnUnsubscribe(0xc008a2e9f0)
live_tumlive.1.8riczi1h9ebr@vmrbg451    | 	/go/src/app/api/live_update.go:55 +0xd8
live_tumlive.1.8riczi1h9ebr@vmrbg451    | github.com/mono424/go-pts.(*Channel).UnsubscribeAllPaths(0xc0001d40e0, {0xc007274f60?, 0xc004a1ce18?})
live_tumlive.1.8riczi1h9ebr@vmrbg451    | 	/go/pkg/mod/github.com/mono424/[email protected]/channel.go:128 +0x71
live_tumlive.1.8riczi1h9ebr@vmrbg451    | github.com/mono424/go-pts.(*ChannelStore).UnsubscribeAll(...)
live_tumlive.1.8riczi1h9ebr@vmrbg451    | 	/go/pkg/mod/github.com/mono424/[email protected]/channel_store.go:81
live_tumlive.1.8riczi1h9ebr@vmrbg451    | github.com/mono424/go-pts.(*TubeSystem).disconnectHandler(0xc00007b798?, 0xc004a1ce70?)
live_tumlive.1.8riczi1h9ebr@vmrbg451    | 	/go/pkg/mod/github.com/mono424/[email protected]/tube_system.go:84 +0x85
live_tumlive.1.8riczi1h9ebr@vmrbg451    | github.com/mono424/go-pts.(*Connector).Leave(0xc00007b780, {0xc007274f60?, 0x4f128e?})
live_tumlive.1.8riczi1h9ebr@vmrbg451    | 	/go/pkg/mod/github.com/mono424/[email protected]/connector.go:55 +0x4f
live_tumlive.1.8riczi1h9ebr@vmrbg451    | github.com/mono424/go-pts-gorilla-connector.NewConnector.func1.2.1()
live_tumlive.1.8riczi1h9ebr@vmrbg451    | 	/go/pkg/mod/github.com/mono424/[email protected]/gorilla_connector.go:33 +0xb2
live_tumlive.1.8riczi1h9ebr@vmrbg451    | github.com/mono424/go-pts-gorilla-connector.NewConnector.func1.2()
live_tumlive.1.8riczi1h9ebr@vmrbg451    | 	/go/pkg/mod/github.com/mono424/[email protected]/gorilla_connector.go:44 +0x13b
live_tumlive.1.8riczi1h9ebr@vmrbg451    | created by github.com/mono424/go-pts-gorilla-connector.NewConnector.func1
live_tumlive.1.8riczi1h9ebr@vmrbg451    | 	/go/pkg/mod/github.com/mono424/[email protected]/gorilla_connector.go:27 +0x11e

Are we using this correctly or is there an issue with the library? Regardless, in nil cases we should always return an error instead of panicking.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.