Skip to content

Commit

Permalink
Fix remove dead code (All-Hands-AI#6249)
Browse files Browse the repository at this point in the history
  • Loading branch information
tofarr authored and Calvin Smith committed Jan 19, 2025
1 parent a70e3cb commit b3ea066
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
11 changes: 3 additions & 8 deletions openhands/server/listen_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from openhands.events.serialization import event_to_dict
from openhands.events.stream import AsyncEventStreamWrapper
from openhands.server.routes.settings import ConversationStoreImpl, SettingsStoreImpl
from openhands.server.session.manager import ConversationDoesNotExistError
from openhands.server.shared import config, openhands_config, session_manager, sio
from openhands.server.types import AppMode

Expand Down Expand Up @@ -61,13 +60,9 @@ async def connect(connection_id: str, environ, auth):
'Settings not found', {'msg_id': 'CONFIGURATION$SETTINGS_NOT_FOUND'}
)

try:
event_stream = await session_manager.join_conversation(
conversation_id, connection_id, settings, user_id
)
except ConversationDoesNotExistError:
logger.error(f'Conversation {conversation_id} does not exist')
raise ConnectionRefusedError(f'Conversation {conversation_id} does not exist')
event_stream = await session_manager.join_conversation(
conversation_id, connection_id, settings, user_id
)

agent_state_changed = None
async_stream = AsyncEventStreamWrapper(event_stream, latest_event_id + 1)
Expand Down
4 changes: 0 additions & 4 deletions openhands/server/session/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
_CLEANUP_EXCEPTION_WAIT_TIME = 15


class ConversationDoesNotExistError(Exception):
pass


@dataclass
class _SessionIsRunningCheck:
request_id: str
Expand Down

0 comments on commit b3ea066

Please sign in to comment.