Git Product home page Git Product logo

dggchat's People

Contributors

jbpratt avatar mattroseman avatar theneedyguy avatar voloshink avatar xdashh avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

dggchat's Issues

change the badges to point to this repo

GoDoc
[![GoDoc](https://godoc.org/github.com/MemeLabs/dggchat?status.svg)](https://godoc.org/github.com/MemeLabs/dggchat)

Go Report Card
[![Go Report Card](https://goreportcard.com/badge/github.com/memelabs/dggchat)](https://goreportcard.com/report/github.com/memelabs/dggchat)

random panic

I sometimes get this when trying to connect.
seems to happen randomly, I don't change anything.

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x228b60]

goroutine 28 [running]:
github.com/gorilla/websocket.(*Conn).NextReader(0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /home/pi/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:938 +0x14
github.com/gorilla/websocket.(*Conn).ReadMessage(0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
        /home/pi/go/pkg/mod/github.com/gorilla/[email protected]/conn.go:1028 +0x1c
github.com/Memelabs/dggchat.(*Session).listen(0x20824d0)
        /home/pi/go/pkg/mod/github.com/!memelabs/[email protected]/session.go:164 +0x24
created by github.com/Memelabs/dggchat.(*Session).open
        /home/pi/go/pkg/mod/github.com/!memelabs/[email protected]/session.go:115 +0xfc

Reap/Close old connections when max connection count is hit

Due to firefox tabs continually crashing on me, I quickly hit the 5 connection count cap (https://github.com/destinygg/chat/blob/master/connection.go#L138).

Rather than outright rejecting new connections, would it make sense to close old connections (resetting to 0) and allowing new connections?

I'd be perfectly willing to put in a patch/PR should anyone have any input on this.

ian@home ~ $ netstat | awk '/destiny/'
tcp        0      0 192.168.1.4:53654       destiny.gg:https        ESTABLISHED
tcp        0      0 192.168.1.4:54422       destiny.gg:https        ESTABLISHED
tcp        0      0 192.168.1.4:54232       destiny.gg:https        ESTABLISHED
tcp        0      0 192.168.1.4:54588       destiny.gg:https        ESTABLISHED
tcp        0      0 192.168.1.4:53466       destiny.gg:https        ESTABLISHED

I believe @SoMuchForSubtlety is having this issue

Proposal: guarantee message sent successfully if SendMessage() returns no error

Right now errors are handled by the errorHandler, but it's not possible to determine for what message the error was and thus handling it is not really possible.

It is possible to determine if the message was sent successfully if we wait for the ws to respond with either an error or confirmation.
There would need to be a mutex for the ws that gets locked every time we send a message until confirmation is received to prevent getting errors or confirmation meant for a different message.

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.