[Modify] Replace it
This commit is contained in:
		@@ -482,20 +482,22 @@ namespace WebSocketSharp
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
      set {
 | 
					      set {
 | 
				
			||||||
        lock (_forConn) {
 | 
					        lock (_forConn) {
 | 
				
			||||||
          var msg = checkIfAvailable (true, false, true, false, false, true);
 | 
					          string msg;
 | 
				
			||||||
          if (msg == null) {
 | 
					          if (!checkIfAvailable (true, false, true, false, false, true, out msg)) {
 | 
				
			||||||
            if (value.IsNullOrEmpty ()) {
 | 
					            _logger.Error (msg);
 | 
				
			||||||
              _origin = value;
 | 
					            error ("An error has occurred in setting the origin.", null);
 | 
				
			||||||
              return;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
            Uri origin;
 | 
					            return;
 | 
				
			||||||
            if (!Uri.TryCreate (value, UriKind.Absolute, out origin) || origin.Segments.Length > 1)
 | 
					 | 
				
			||||||
              msg = "The syntax of an origin must be '<scheme>://<host>[:<port>]'.";
 | 
					 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          if (msg != null) {
 | 
					          if (value.IsNullOrEmpty ()) {
 | 
				
			||||||
            _logger.Error (msg);
 | 
					            _origin = value;
 | 
				
			||||||
 | 
					            return;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          Uri origin;
 | 
				
			||||||
 | 
					          if (!Uri.TryCreate (value, UriKind.Absolute, out origin) || origin.Segments.Length > 1) {
 | 
				
			||||||
 | 
					            _logger.Error ("The syntax of an origin must be '<scheme>://<host>[:<port>]'.");
 | 
				
			||||||
            error ("An error has occurred in setting the origin.", null);
 | 
					            error ("An error has occurred in setting the origin.", null);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            return;
 | 
					            return;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user