Skip to content

Commit

Permalink
fix crash upon receiving empty inbounds
Browse files Browse the repository at this point in the history
  • Loading branch information
khodedawsh authored Jun 29, 2024
1 parent 9436603 commit 98c5cc2
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions marznode/service/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,14 @@ async def _update_user(self, user_data: UserData):
)
return
elif not user_data.inbounds and storage_user:
"""remove in case we have th user but client has sent
"""remove in case we have the user but client has sent
us an empty list of inbounds"""
await self._remove_user(storage_user, storage_user.inbounds)
return await self._storage.remove_user(user)

elif not user_data.inbounds and not storage_user:
"""we're asked to remove a user which we don't have, just pass."""
return

"""otherwise synchronize the user with what
the client has sent us"""
storage_tags = {i.tag for i in storage_user.inbounds}
Expand Down

0 comments on commit 98c5cc2

Please sign in to comment.