Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8275006

ServerSocket in wsl2 missing Exception

    XMLWordPrintable

    Details

    • Subcomponent:
    • CPU:
      generic
    • OS:
      windows

      Description

      ADDITIONAL SYSTEM INFORMATION :
      WSL2 Ubuntu 20.04 in Windows 10

      A DESCRIPTION OF THE PROBLEM :
      ServerSocket in wsl2 java runtime starts also when port is already in use

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      ServerSocket socket1 = new ServerSocket(63132);
      ServerSocket socket2 = new ServerSocket(63132);

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      socket2 init fails
      ACTUAL -
      socket2 inits

      ---------- BEGIN SOURCE ----------
      import java.net.ServerSocket;

      class Scratch {
          public static void main(String[] args) {
              ServerSocket socket1 = new ServerSocket(63132);
              ServerSocket socket2 = new ServerSocket(63132);
          }
      }

      ---------- END SOURCE ----------

        Attachments

          Activity

            People

            Assignee:
            tongwan Andrew Wang
            Reporter:
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: