Skip to content

Commit 05c6039

Browse files
s-gattichulspro
s-gatti
authored andcommitted
fix linter issue and code format
Signed-off-by: s-gatti <[email protected]> Signed-off-by: Charles Kim <[email protected]>
1 parent 04b25f8 commit 05c6039

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

app/socket_connection_manager.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ async def broadcast(self, message: Union[str, dict, list]) -> None:
9595
await websocket.close()
9696
logger.warning(
9797
f'Failed to send message: "{message}"'
98-
f' to websocket: "{websocket}", connection closed."')
98+
f' to websocket: "{websocket}", connection closed."'
99+
)
99100
except RuntimeError as e:
100101
logger.warning(
101102
f'Failed to send: "{message}" to websocket: "{websocket}."',
@@ -112,7 +113,7 @@ async def received_message(self, websocket: WebSocket, message: str) -> None:
112113
websocket=websocket, message=INVALID_JSON_ERROR_STR
113114
)
114115

115-
async def relay_video_frames(self, connection: WebSocketConnection):
116+
async def relay_video_frames(self, connection: WebSocketConnection) -> None:
116117
if connection.type == WebSocketTypeEnum.VIDEO:
117118
websocket = connection.websocket
118119
try:
@@ -131,10 +132,10 @@ async def relay_video_frames(self, connection: WebSocketConnection):
131132
logger.error(f"Failed with {e}")
132133
finally:
133134
await websocket.close()
134-
self.active_connections.remove(connection)
135+
self.disconnect(connection)
135136
else:
136137
logger.error(
137-
f'Excpected websocket connection of type {WebSocketTypeEnum.VIDEO}'
138+
f"Expected websocket connection of type {WebSocketTypeEnum.VIDEO}"
138139
)
139140

140141
# Note: Currently we only support one message handler per type, registering the

0 commit comments

Comments
 (0)