How can I interrupt a ServerSocket accept() method? November 14, 2022 by Tarik You can call close() from another thread, and the accept() call will throw a SocketException.