BroadcastChannel.onMessage() runs multi-times. Why? #500
-
Hi everyone. I write BroadcastChannel.onMessage(handler) in my server.ts file. But when an other BroadcastChannel instance (constructed in a route request hander) send one message, Anybody know why this behavior happen? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
It seems like this behavior is caused by dev mode. |
Beta Was this translation helpful? Give feedback.
-
dev will re-import the server.ts with random query when it changes, the 'side effect' wouldn't be removed automatically |
Beta Was this translation helpful? Give feedback.
dev will re-import the server.ts with random query when it changes, the 'side effect' wouldn't be removed automatically