Skip to content

Commit

Permalink
Code review
Browse files Browse the repository at this point in the history
  • Loading branch information
sssilver committed Jan 15, 2018
1 parent 0a06851 commit 0b7e77d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.test
*.cpuprofile
*.swp
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ func getImg(r *http.Request) (io.ReadCloser, error) {

func main() {
runtime.GOMAXPROCS(4)
port := "localhost:4000"
port := "0.0.0.0:4000"
fmt.Println("Running on", port)

http.HandleFunc("/", fileHandler)
Expand Down
4 changes: 1 addition & 3 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ func newClient(conn *websocket.Conn) *Client {

// The Dispatcher; we spawn one for every client
func (c *Client) tx() {
defer func() {
c.conn.Close()
}()
defer c.conn.Close()

for {
event, ok := <-c.broadcast
Expand Down

0 comments on commit 0b7e77d

Please sign in to comment.