[Modify] Polish it

This commit is contained in:
sta 2019-06-29 20:42:52 +09:00
parent 2dfde14d5d
commit d4237fab1b

View File

@ -1257,18 +1257,18 @@ namespace WebSocketSharp
Action<Exception> error
)
{
var input = new MemoryStream (bytes);
input.CopyToAsync (
var src = new MemoryStream (bytes);
src.CopyToAsync (
stream,
bufferLength,
() => {
if (completed != null)
completed ();
input.Dispose ();
src.Dispose ();
},
ex => {
input.Dispose ();
src.Dispose ();
if (error != null)
error (ex);
}