File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
src/com/codebutler/android_websockets Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ public void connect() {
6969 @ Override
7070 public void run () {
7171 try {
72- int port = (mURI .getPort () != -1 ) ? mURI .getPort () : (mURI .getScheme ().equals ("wss" ) ? 443 : 80 );
72+ int port = (mURI .getPort () != -1 ) ? mURI .getPort () : (( mURI .getScheme ().equals ("wss" ) || mURI . getScheme (). equals ( "https" ) ) ? 443 : 80 );
7373
7474 String path = TextUtils .isEmpty (mURI .getPath ()) ? "/" : mURI .getPath ();
7575 if (!TextUtils .isEmpty (mURI .getQuery ())) {
@@ -79,7 +79,7 @@ public void run() {
7979 String originScheme = mURI .getScheme ().equals ("wss" ) ? "https" : "http" ;
8080 URI origin = new URI (originScheme , "//" + mURI .getHost (), null );
8181
82- SocketFactory factory = mURI .getScheme ().equals ("wss" ) ? getSSLSocketFactory () : SocketFactory .getDefault ();
82+ SocketFactory factory = ( mURI .getScheme ().equals ("wss" ) || mURI . getScheme (). equals ( "https" ) ) ? getSSLSocketFactory () : SocketFactory .getDefault ();
8383 mSocket = factory .createSocket (mURI .getHost (), port );
8484
8585 PrintWriter out = new PrintWriter (mSocket .getOutputStream ());
You can’t perform that action at this time.
0 commit comments