[Modify] Add a check
This commit is contained in:
parent
49b09654f6
commit
8126aa5111
@ -2870,9 +2870,16 @@ namespace WebSocketSharp
|
|||||||
/// </param>
|
/// </param>
|
||||||
public void SetProxy (string url, string username, string password)
|
public void SetProxy (string url, string username, string password)
|
||||||
{
|
{
|
||||||
|
string msg;
|
||||||
|
if (!checkIfAvailable (true, false, true, false, false, true, out msg)) {
|
||||||
|
_logger.Error (msg);
|
||||||
|
error ("An error has occurred in setting the proxy.", 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 proxy.", null);
|
error ("An error has occurred in setting the proxy.", null);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user