Do not write to unconnected event pipe.
Do not write to unconnected event pipe.

If a event pipe is not connected it is a bad idea to write something
there pretending it is connected. Hence, close and reset descriptor
to -1 in case of connection error.

junovitch/pkg,khorben/pkg,khorben/pkg,en90/pkg,khorben/pkg,en90/pkg,Open343/pkg,Open343/pkg,junovitch/pkg,skoef/pkg,skoef/pkg