rS285910 attempted to make shutdown() be POSIX compliant by returning ENOTCONN when shutdown() is called on unconnected sockets. This change was slightly modified by rS316874, which returns ENOTCONN in the case of an unconnected datagram socket, but still runs the shutdown code for the socket. This specifically supports the case where the user-space code is using the shutdown() call to wakeup another thread blocked on the socket.
In PR 227259, a user is reporting that they have code which is using shutdown() to wakup another thread blocked on a stream listen socket. This code is failing, while it used to work on FreeBSD 10 and still works on Linux.
Without expressing an opinion on whether the underlying code *should* be written in this way, it seems reasonable to add another exception to support something users are actually doing and which used to work on FreeBSD 10 and still works on Linux. And, it seems like it should be acceptable to POSIX, as we still return ENOTCONN.