villekr / ocpp-asgi

ocpp-asgi extends ocpp library to provide ASGI compliant interface for implementing OCPP Central System.
MIT License
20 stars 4 forks source link

Half TCP connection closed error #8

Closed ChaitanyaYeole02 closed 1 year ago

ChaitanyaYeole02 commented 1 year ago

I received this error when I disconnected my charger while a message was still in process. @villekr This could be changed in the next version.

    async def on_receive(self, *, message: str, context: RouterContext):
        router: Router = self.routers[context.subprotocol]
        try:
            await router.route_message(message=message, context=context)
        except:
            pass
villekr commented 1 year ago

This should be handled correctly in fix https://github.com/villekr/ocpp-asgi/pull/11.