CID-1116245: Lock for getting answers from SynchronousListener

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>