Skip to content

Socket>>#listenOn:backlogSize: doesn’t signal an error if another socket is already listening on the same port #11723

Closed
@Rinzwind

Description

@Rinzwind

In the following example, no error is signaled; shouldn’t the second send of #listenOn:backlogSize: signal an error as the first socket is already listening on the same port?

socket1 := Socket newTCP.
socket1 listenOn: 1701 backlogSize: 1.
socket1 isValid ifFalse: [ Error signal ].
socket2 := Socket newTCP.
socket2 listenOn: 1701 backlogSize: 1.
socket2 isValid ifFalse: [ Error signal ].

Version information:

  • Image: Pharo-11.0.0+build.224.sha.6fcd6c1aaf965912b63ffc2ef2059d10cf57c744 (64 Bit)
  • VM: Pharo 9.0.18 built on Sep 2 2022 16:54:02 Compiler: 4.2.1 Compatible Apple LLVM 11.0.3 (clang-1103.0.32.29)
  • OS: macOS 11.7

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions