Linux sendmsg can return ECONNREFUSED. For the higher levels, this must be treated the same as "socket does not exist". In particular, notifyd must clean up the destination entries for a process when messaging_send returns this error.
Created attachment 12814 [details] patch for 4.6 and master
Created attachment 12815 [details] Patch for 4.5
Comment on attachment 12815 [details] Patch for 4.5 The 4.5 patch also applies to 4.4
Created attachment 12821 [details] Patch for 4.5 and 4.4 incl. cherry-pick information
Created attachment 12822 [details] Patch for 4.6 incl. cherry-pick information
Pushed to autobuild-v4-{6,5,4}-test.
(In reply to Karolin Seeger from comment #6) Pushed to all branches. Closing out bug report. Thanks!