close protocolProvider after exception