forked from mirror/ledisdb
add quit commands
This commit is contained in:
parent
828b74e2d5
commit
6c88687ebf
|
@ -23,6 +23,7 @@ var unsopportedCommands = map[string]struct{}{
|
|||
"slaveof": struct{}{},
|
||||
"fullsync": struct{}{},
|
||||
"sync": struct{}{},
|
||||
"quit": struct{}{},
|
||||
}
|
||||
|
||||
type httpClient struct {
|
||||
|
|
|
@ -138,6 +138,11 @@ func (c *respClient) handleRequest(reqData [][]byte) {
|
|||
c.req.cmd = strings.ToLower(ledis.String(reqData[0]))
|
||||
c.req.args = reqData[1:]
|
||||
}
|
||||
if c.req.cmd == "quit" {
|
||||
c.req.resp.writeStatus(OK)
|
||||
c.req.resp.flush()
|
||||
c.conn.Close()
|
||||
}
|
||||
|
||||
req.db = c.db
|
||||
|
||||
|
|
Loading…
Reference in New Issue