Implemented semaphore for rpc client connections to prevent errors while operation is blocked