Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/diiyw/nodis
Browse files Browse the repository at this point in the history
  • Loading branch information
diiyw committed Jan 8, 2025
2 parents a7bbed3 + fac7ca5 commit e19c007
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ func cmdNotFound(n *Nodis, conn *redis.Conn, cmd redis.Command) {

func hello(n *Nodis, conn *redis.Conn, cmd redis.Command) {
execCommand(conn, func() {
conn.WriteArray(13)
conn.WriteArray(14)
conn.WriteBulk("server")
conn.WriteBulk("redis")
conn.WriteBulk("version")
Expand All @@ -303,6 +303,7 @@ func hello(n *Nodis, conn *redis.Conn, cmd redis.Command) {
conn.WriteBulk("role")
conn.WriteBulk("master")
conn.WriteBulk("modules")
conn.WriteArray(0)
})
}

Expand Down
3 changes: 1 addition & 2 deletions nodis.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ func (n *Nodis) Serve(addr string) error {
os.Exit(0)
}()
return redis.Serve(addr, func(conn *redis.Conn, cmd redis.Command) {
c := GetCommand(cmd.Name)
c(n, conn, cmd)
GetCommand(cmd.Name)(n, conn, cmd)
if conn.HasError() && conn.State != 0 {
conn.State |= redis.MultiError
}
Expand Down

0 comments on commit e19c007

Please sign in to comment.