Skip to content

Commit

Permalink
[Bugfix] typos
Browse files Browse the repository at this point in the history
  • Loading branch information
genofire committed Aug 26, 2017
1 parent 7c6f22b commit faa4d97
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions database/socket/client/dial.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ func Dial(ctype, addr string) *Dialer {
}

func (d *Dialer) Start() {
go d.reciever()
go d.receiver()
d.parser()
}
func (d *Dialer) Close() {
d.conn.Close()
close(d.quit)
}

func (d *Dialer) reciever() {
func (d *Dialer) receiver() {
decoder := json.NewDecoder(d.conn)
var msg socket.Message

Expand Down Expand Up @@ -83,4 +83,4 @@ func (d *Dialer) parser() {
}
}
}
}
}
4 changes: 2 additions & 2 deletions database/socket/client/dial_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestConnectError(t *testing.T) {
}, "could connect")
}

func TestRecieveMessages(t *testing.T) {
func TestReceiveMessages(t *testing.T) {
assert := assert.New(t)
server, err := socket.Connect(map[string]interface{}{
"enable": true,
Expand Down Expand Up @@ -66,4 +66,4 @@ func TestRecieveMessages(t *testing.T) {
assert.False(runned, "message recieve")

server.Close()
}
}
4 changes: 2 additions & 2 deletions database/socket/internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ func (conn *Connection) sendJSON(msg Message) {

err := d.Encode(&msg)
if err != nil {
log.Println("[socket-database] client has not recieve event:", err)
log.Println("[socket-database] client has not receive event:", err)
c.Close()
delete(conn.clients, addr)
}
}
conn.clientMux.Unlock()
}
}

0 comments on commit faa4d97

Please sign in to comment.