mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-20 22:49:36 +08:00
Made GET, MGET, SET, MSET, SETNX commands compatible with redis client
This commit is contained in:
@@ -208,6 +208,7 @@ func (server *Server) handleConnection(ctx context.Context, conn net.Conn) {
|
||||
|
||||
if err != nil && errors.Is(err, io.EOF) {
|
||||
// Connection closed
|
||||
log.Println(err)
|
||||
break
|
||||
}
|
||||
|
||||
@@ -219,7 +220,7 @@ func (server *Server) handleConnection(ctx context.Context, conn net.Conn) {
|
||||
res, err := server.handleCommand(ctx, message, &conn, false)
|
||||
|
||||
if err != nil {
|
||||
if _, err = w.Write([]byte(fmt.Sprintf("-Error %s\r\n\r\n", err.Error()))); err != nil {
|
||||
if _, err = w.Write([]byte(fmt.Sprintf("-Error %s\r\n", err.Error()))); err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
continue
|
||||
|
Reference in New Issue
Block a user