Historically, the FreeBSD shutdown(2) system call did not make distinction between datagram and stream sockets. This allowed one thread (or process) to interrupt other thread (or process) blocked in recvXXX(2) by calling shutdown() on that socket. The revision D3039 (subsequently checked into svn rev 285910) has removed this behavior. Unfortunately POSIX provides no other clean way to do that and there are quite lot of software that depends on the old behavior. In addition, analysis done in the D3039 used as a basis for making this change is not entirely correct, for example fairly recent Linux kernel (4.4.0 as of time of this writing) actually tears socket down even for datagram socket and causes any current or future blocking reads on that socket to fail with 0-lengh result.
Attached patch makes FreeBSD behavior match our historical behavior and that of our Linux 4.4.0, i.e. return ENOTCONN but still "disconnect" socket and fail any current or future readers.