Make rpc pipeine example stable
Make rpc pubsub example stable
Wait for closing server/client after close() call