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