explodinglabs / jsonrpcserver

Process incoming JSON-RPC requests in Python
https://www.jsonrpcserver.com
MIT License
185 stars 40 forks source link

The serve() method will get stuck #265

Closed liyuefeng closed 1 year ago

liyuefeng commented 1 year ago

window 11 release:5.0.9 code: serve()

I find self.__shutdown_request is always False and serve can not start while not self.__shutdown_request: ready = selector.select(poll_interval)

bpo-35017: shutdown() called during select(), exit immediately.

                if self.__shutdown_request:
                    break
                if ready:
                    self._handle_request_noblock()
bcb commented 1 year ago

Thanks for reporting.

The serve function is only meant for basic testing. For anything more you should use dispatch.

This will be fixed in version 6. Closing as a duplicate of #264