Fix error event handling for pooled clients

Do not emit error events if no listeners are present