[Modify] Add a check
This commit is contained in:
parent
cf6d4dc9ac
commit
5bf96cf7ff
@ -2765,9 +2765,16 @@ namespace WebSocketSharp
|
||||
/// </param>
|
||||
public void SetCookie (Cookie cookie)
|
||||
{
|
||||
string msg;
|
||||
if (!checkIfAvailable (true, false, true, false, false, true, out msg)) {
|
||||
_logger.Error (msg);
|
||||
error ("An error has occurred in setting a cookie.", null);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
lock (_forConn) {
|
||||
string msg;
|
||||
if (!checkIfAvailable (true, false, true, false, false, true, out msg)) {
|
||||
if (!checkIfAvailable (true, false, false, true, out msg)) {
|
||||
_logger.Error (msg);
|
||||
error ("An error has occurred in setting a cookie.", null);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user