title: Error by SSLServerSocket
body: <p>I tried to make an Android Server with an SSLServerSocket. I made a keystore and started to make the server. I initialize the server as follows:</p>
  
  <pre><code>        String keyStoreType = KeyStore.getDefaultType();
          KeyStore keyStore = KeyStore.getInstance(keyStoreType);
          InputStream inputStream = context.getResources().openRawResource(R.raw.server);
          keyStore.load(inputStream, "passwd".toCharArray());
  
          String keyalg = KeyManagerFactory.getDefaultAlgorithm();
          kmf.init(keyStore, "passwd".toCharArray());
  
          KeyManagerFactory kmf = KeyManagerFactory.getInstance(keyalg);
          SSLContext context = SSLContext.getInstance("TLS");
          context.init(kmf.getKeyManagers(), null, null);
          SSLServerSocket ss = (SSLServerSocket) context.getServerSocketFactory().createServerSocket();
          inputStream.close();
  
          //Here comes the error
          ss.accept();
  </code></pre>
  
  <p>So if I try to accept clients (without that the client side tried to connect), I get an error.</p>
  
  <pre><code>        java.net.SocketException: accept failed: EINVAL (Invalid argument)
          at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:110)
          at java.net.ServerSocket.implAccept(ServerSocket.java:203)
          at  com.android.org.conscrypt.OpenSSLServerSocketImpl.accept(OpenSSLServerSocketImpl.java:184)
          at de.turtc.util.ServerUtil.run(ServerUtil.java:88)
  
          Caused by: libcore.io.ErrnoException: accept failed: EINVAL (Invalid argument)
          at libcore.io.Posix.accept(Native Method)
          at libcore.io.BlockGuardOs.accept(BlockGuardOs.java:55)
          at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:98)
  </code></pre>
  
  <p>Without a SSLServerSocket it works! I dont get any information of this error!</p>