[Modify] Polish it
This commit is contained in:
parent
2dfde14d5d
commit
d4237fab1b
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user