CID-1116248: Synchornize method in SynchronousListener

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
CID-1116245: Lock for getting answers from SynchronousListener

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