[Modify] Polish it
This commit is contained in:
parent
5e28f47868
commit
1f196b7bb4
@ -741,12 +741,15 @@ namespace WebSocketSharp.Net
|
||||
/// </exception>
|
||||
public void Close (byte[] responseEntity, bool willBlock)
|
||||
{
|
||||
checkDisposed ();
|
||||
if (_disposed)
|
||||
throw new ObjectDisposedException (GetType ().ToString ());
|
||||
|
||||
if (responseEntity == null)
|
||||
throw new ArgumentNullException ("responseEntity");
|
||||
|
||||
var len = responseEntity.Length;
|
||||
var output = OutputStream;
|
||||
|
||||
if (willBlock) {
|
||||
output.Write (responseEntity, 0, len);
|
||||
close (false);
|
||||
@ -762,7 +765,8 @@ namespace WebSocketSharp.Net
|
||||
output.EndWrite (ar);
|
||||
close (false);
|
||||
},
|
||||
null);
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user