[Modify] Polish it

This commit is contained in:
sta 2018-09-18 19:38:48 +09:00
parent 8e4fc80f7c
commit 07caf5c948

View File

@ -866,12 +866,12 @@ namespace WebSocketSharp.Net
internal static byte[] InternalUrlEncodeUnicodeToBytes (string s)
{
using (var res = new MemoryStream ()) {
using (var buff = new MemoryStream ()) {
foreach (var c in s)
urlEncodeUnicode (c, res);
urlEncodeUnicode (c, buff);
res.Close ();
return res.ToArray ();
buff.Close ();
return buff.ToArray ();
}
}