diff --git a/src/workerd/server/server.c++ b/src/workerd/server/server.c++ index cb8a181eb671..9de0e5f5a93c 100644 --- a/src/workerd/server/server.c++ +++ b/src/workerd/server/server.c++ @@ -1394,10 +1394,13 @@ public: auto loopback = kj::refcounted(*this, kj::str(id)); Worker::Lock lock(*service.worker, asyncLock); + // We define this event ID in the internal codebase, but to have WebSocket Hibernation + // work for local development we need to pass an event type. + uint16_t hibernationEventTypeId = 8; auto newActor = kj::refcounted( *service.worker, nullptr, kj::str(id), true, kj::mv(makeActorCache), className, kj::mv(makeStorage), lock, kj::mv(loopback), - timerChannel, kj::refcounted(), nullptr, nullptr); + timerChannel, kj::refcounted(), nullptr, hibernationEventTypeId); // If the actor becomes broken, remove it from the map, so a new one will be created // next time.