diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 51ab497115eb7eda412870a895a8e2197adbffca..fc820cd7545309645c018da6a29d170bc67ad0f2 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1074,6 +1074,8 @@ restart:
 	err = -ECONNREFUSED;
 	if (other->sk_state != TCP_LISTEN)
 		goto out_unlock;
+	if (other->sk_shutdown & RCV_SHUTDOWN)
+		goto out_unlock;
 
 	if (unix_recvq_full(other)) {
 		err = -EAGAIN;