simperby icon indicating copy to clipboard operation
simperby copied to clipboard

Prevent DMS from sending rpc-fetch request to itself in `serve()`.

Open f2koi opened this issue 2 years ago • 1 comments

When DMS::serve() is called, the associated dms spawns several tasks; Two of them are serve_fetch and serve_rpc. The problem arises when serve_fetch tries to fetch messages from serve_rpc. Upon receiving the rpc-fetch request, serve_rpc tries to acquire a readonly lock of its associated dms, but it fails (I guess a lock for writing is already created somewhere). Therefore, the serve_rpc task wait for the lock indefinitely.

f2koi avatar Feb 01 '23 16:02 f2koi

Anyway, it is redundant for the serve() process to send rpc-fetch request to its own dms. No matter where this bug(is it really a bug?) comes from, I will try to fix this behavior of self-fetching. That's the primary purpose of this issue.

f2koi avatar Feb 01 '23 17:02 f2koi