Skip to content
This repository has been archived by the owner on Sep 18, 2021. It is now read-only.

Commit

Permalink
'version' and 'dump-stats' command shoud not be returned extra new line.
Browse files Browse the repository at this point in the history
Currently these commands returns redundant empty line.
Client libraries for memcached (such as xmemcached) does not expect empty line.
  • Loading branch information
prcm committed Aug 30, 2011
1 parent f303481 commit 634da0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/net/lag/kestrel/MemcacheHandler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ extends NettyHandler[MemcacheRequest](channelGroup, queueCollection, maxOpenTran
dump += queues.stats(qName).map { case (k, v) => k + "=" + v }.mkString(" ", "\r\n ", "")
dump += "}"
}
channel.write(new MemcacheResponse(dump.mkString("", "\r\n", "\r\nEND\r\n")))
channel.write(new MemcacheResponse(dump.mkString("", "\r\n", "\r\nEND")))
}

private def version() = {
channel.write(new MemcacheResponse("VERSION " + Kestrel.runtime.jarVersion + "\r\n"))
channel.write(new MemcacheResponse("VERSION " + Kestrel.runtime.jarVersion))
}

private def quit() = {
Expand Down

0 comments on commit 634da0d

Please sign in to comment.