@@ -1368,17 +1368,17 @@ void Channel::asyncGetThread(Channel* channel)
13681368
13691369 try {
13701370 AsyncRequestPtr asyncRequest = channel->asyncGetRequestQueue .frontAndPop ();
1371+
13711372 // there were queued requests, reset poll counter
13721373 remainingRuntime = MaxAsyncRequestWaitTimeout;
13731374 try {
13741375 // Cannot allow shutdown while callback is being executed
13751376 pvd::Lock lock (channel->asyncGetThreadMutex );
13761377
13771378 channel->asyncConnect ();
1378- pvc::PvaClientGetPtr pvaGet = channel->createGetPtr (asyncRequest->requestDescriptor );
1379- pvaGet->get ();
1380- pvd::PVStructurePtr pvStructure = pvaGet->getData ()->getPVStructure ();
1381- PvObject pvObject (pvStructure);
1379+ pvc::PvaClientGetPtr asyncPvaGet = channel->createGetPtr (asyncRequest->requestDescriptor );
1380+ asyncPvaGet->get ();
1381+ PvObject pvObject (asyncPvaGet->getData ()->getPVStructure ());
13821382 if (!channel->shutdownInProgress ) {
13831383 logger.trace (" Invoking async get callback" );
13841384 channel->invokePyCallback (asyncRequest->pyCallback , pvObject);
@@ -1465,6 +1465,7 @@ void Channel::asyncPutThread(Channel* channel)
14651465
14661466 try {
14671467 AsyncRequestPtr asyncRequest = channel->asyncPutRequestQueue .frontAndPop ();
1468+
14681469 // there were queued requests, reset poll counter
14691470 remainingRuntime = MaxAsyncRequestWaitTimeout;
14701471 try {
@@ -1475,8 +1476,7 @@ void Channel::asyncPutThread(Channel* channel)
14751476 pvc::PvaClientPutPtr asyncPvaPut = channel->createPutPtr (asyncRequest->requestDescriptor );
14761477 channel->preparePut (PvObject (asyncRequest->pvStructurePtr ), asyncPvaPut);
14771478 asyncPvaPut->put ();
1478- pvd::PVStructurePtr pvStructure = asyncPvaPut->getData ()->getPVStructure ();
1479- PvObject pvObject (pvStructure);
1479+ PvObject pvObject (asyncPvaPut->getData ()->getPVStructure ());
14801480 if (!channel->shutdownInProgress ) {
14811481 logger.trace (" Invoking async put callback" );
14821482 channel->invokePyCallback (asyncRequest->pyCallback , pvObject);
0 commit comments