[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 Action<Exception> error
) )
{ {
var input = new MemoryStream (bytes); var src = new MemoryStream (bytes);
input.CopyToAsync ( src.CopyToAsync (
stream, stream,
bufferLength, bufferLength,
() => { () => {
if (completed != null) if (completed != null)
completed (); completed ();
input.Dispose (); src.Dispose ();
}, },
ex => { ex => {
input.Dispose (); src.Dispose ();
if (error != null) if (error != null)
error (ex); error (ex);
} }