Help with #YD3 stage

I’m stuck on Stage #YD3

Here is my repo and command that gets executed own-redis/src/ReplConfigCommand.cs at master · ravividap/own-redis · GitHub

Here are my logs:

And here’s a snippet of my code:

       var offSet = dataStore.GetOffSet().ToString();
       dataStore.SetOffSet(37);
       var response = $"*3\r\n$8\r\nREPLCONF\r\n$3\r\nACK\r\n${offSet.Length}\r\n{offSet}\r\n";

       await client.SendAsync(Encoding.UTF8.GetBytes(response), SocketFlags.None);

I failed to understand how it correctly sends a response for the first getack request, but for the second getack, it’s a completely empty response?
Please check screenshot for output logs.

Help is appreciated.

Hey @ravividap, there might be a few things going on here. The first issue is that it’s unsafe to assume stream.Read will read exactly one command at a time:

Let me know if you’d like help debugging this further!

Ah, got it. Thanks. Let me work on it

Closing this thread due to inactivity. If you still need assistance, feel free to reopen or start a new discussion!

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.