Make sure ErrorReply and StatusReply can be written more then one time

This commit is contained in:
norman 2012-03-12 08:27:10 +01:00
parent a5a41a51a2
commit ba118f214c
2 changed files with 2 additions and 2 deletions

View File

@ -37,7 +37,7 @@ public class ErrorReply extends Reply {
public void write(ChannelBuffer os) throws IOException {
os.writeByte(MARKER);
os.writeBytes(ERR);
os.writeBytes(error);
os.writeBytes(error, 0, error.readableBytes());
os.writeBytes(Command.CRLF);
}
}

View File

@ -34,7 +34,7 @@ public class StatusReply extends Reply {
@Override
public void write(ChannelBuffer os) throws IOException {
os.writeByte(MARKER);
os.writeBytes(status);
os.writeBytes(status, 0, status.readableBytes());
os.writeBytes(Command.CRLF);
}
}