- protected messageListener (message: MessageValue<Data, Data>): void {
- if (message.workerId === this.id) {
- if (message.ready != null) {
- // Startup message received
- this.sendReadyResponse()
- } else if (message.statistics != null) {
+ protected messageListener (message: MessageValue<Data>): void {
+ if (message.workerId != null && message.workerId !== this.id) {
+ throw new Error('Message worker id does not match worker id')
+ } else if (message.workerId === this.id) {
+ if (message.statistics != null) {