You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using PooledSocket.cs. Memcached was returning an "object too large" error, but the response returned had embedded null characters. When I logged the error, my logging library truncated the strings at the null character which caused a bit of confusion for me. Logging Exception.toString() the Message came through, but the stack trace was lost.
I made a small change in PooledSocket that might be helpful. I keep count of the bytes written to the buffer, then:
We're using PooledSocket.cs. Memcached was returning an "object too large" error, but the response returned had embedded null characters. When I logged the error, my logging library truncated the strings at the null character which caused a bit of confusion for me. Logging Exception.toString() the Message came through, but the stack trace was lost.
I made a small change in PooledSocket that might be helpful. I keep count of the bytes written to the buffer, then:
return Encoding.UTF8.GetString(buffer.GetBuffer(), 0, count);
which only returns the bytes written and not the entire buffer.
Is there a better solution?
The text was updated successfully, but these errors were encountered: