Skip to content

bug : concurrent invocation trigger bug . (when protobuf load file to an existed root.) #803

Open
@JJ2667699

Description

@JJ2667699

protobuf.js version: <6.7.3>

concurrent invocation trigger bugs

let __protoRoot = new protobuf.Root();
function _getMessage(path,filename,cb){
	var mess = __protoRoot.lookup(path);
	if(!mess){
		protobuf.load(filename,__protoRoot,(err,root)=>{
			
			if(err)
				throw err;
			if(!__protoRoot.nested)
				throw '__protoRoot.nested is not a object'
			else
				return cb(__protoRoot.lookup(path));
		});
	}
	else
		cb(mess);
}

when concurrent invocate function _getMessage,
it throw '__protoRoot.nested is not a object' error.

nodejs only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions