Skip to content

Commit

Permalink
Return Okay on succesful client creation.
Browse files Browse the repository at this point in the history
  • Loading branch information
nihohit committed Dec 24, 2023
1 parent d0d9247 commit 323d7b6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion glide-core/src/socket_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ async fn create_client(
Ok(client) => client,
Err(err) => return Err(ClientCreationError::ConnectionError(err)),
};
write_result(Ok(Value::Nil), 0, writer).await?;
write_result(Ok(Value::Okay), 0, writer).await?;
Ok(client)
}

Expand Down
2 changes: 1 addition & 1 deletion glide-core/tests/test_socket_listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ mod socket_listener {
let mut socket = socket.try_clone().unwrap();
socket.write_all(&buffer).unwrap();
let _size = read_from_socket(&mut buffer, &mut socket);
assert_null_response(&buffer, CALLBACK_INDEX);
assert_ok_response(&buffer, CALLBACK_INDEX);
}

fn setup_socket(
Expand Down
2 changes: 1 addition & 1 deletion python/python/glide/redis_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ async def _set_connection_configurations(self) -> None:
response_future: asyncio.Future = self._get_future(0)
await self._write_or_buffer_request(conn_request)
await response_future
if response_future.result() is not None:
if response_future.result() is not OK:
raise ClosingError(response_future.result())

async def _write_or_buffer_request(self, request: TRequest):
Expand Down

0 comments on commit 323d7b6

Please sign in to comment.