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