pr-manager-helper: avoid SIGSEGV when writing to the socket fail