fix: corrected a error
authorSekiya <shusei.sekiya@sap.com>
Wed, 26 Jun 2024 07:47:53 +0000 (16:47 +0900)
committerSekiya <shusei.sekiya@sap.com>
Wed, 26 Jun 2024 07:47:53 +0000 (16:47 +0900)
tests/ocpp-server/server.py

index b43f5f36819da6fb4a76501073ce4031be32b3d7..45a7668f33ca9a7d18c0a34a2cd71494cc1a11f1 100644 (file)
@@ -218,11 +218,11 @@ async def main():
 
     args = parser.parse_args()
 
-    on_connect = partial(on_connect, args=args) # Add args to on_connect
+    on_connect_bound = partial(on_connect, args=args) # Add args to on_connect
 
     # Create the WebSocket server and specify the handler for new connections.
     server = await websockets.serve(
-        on_connect,
+        on_connect_bound,
         "127.0.0.1",  # Listen on loopback.
         9000,  # Port number.
         subprotocols=["ocpp2.0", "ocpp2.0.1"],  # Specify OCPP 2.0.1 subprotocols.