Commit 41204570 authored by Marc Gravell's avatar Marc Gravell

drop _serverEncoder; responses are overlapped now

parent 199ad621
......@@ -335,8 +335,7 @@ private void Log(string message)
}
}
}
private Encoder _serverEncoder = Encoding.UTF8.GetEncoder();
static Encoder s_sharedEncoder; // swapped in/out to avoid alloc on the public WriteResponse API
public static void WriteResponse(RedisClient client, PipeWriter output, RedisResult response)
{
......@@ -417,7 +416,7 @@ public bool TryProcessRequest(ref ReadOnlySequence<byte> buffer, RedisClient cli
RedisResult response;
try { response = Execute(client, request); }
finally { request.Recycle(); }
WriteResponse(client, output, response, _serverEncoder);
WriteResponse(client, output, response);
return true;
}
return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment