Skip to content

Commit

Permalink
ApiRequest | fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
a-givertzman committed Dec 1, 2024
1 parent 8b07f19 commit ede84d1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions lib/src/api_client/request/messages.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,17 +72,18 @@ class Messages {
switch (_connection) {
// default:
case Some<Completer<Result<ArcMessage, Failure>>>(value: final connection):
_log.debug('._connect | New connection awaiting...');
// _log.debug('._connect | Connection awaiting...');
return connection.future;
case None():
_log.debug('._connect | New connection...');
// _log.debug('._connect | Connecting...');
final connection = Completer<Result<ArcMessage, Failure>>();
_connection = Some(connection);
_socket(id, bytes, keepAlive).then(
(result) {
// _log.debug('._connect | New connection result: $result');
switch (result) {
case Ok<ArcMessage, Failure>(value: final message):
// _log.debug('._connect | connected');
connection.complete(Ok(message));
_connection = None();
case Err<ArcMessage, Failure>(: final error):
Expand Down Expand Up @@ -110,7 +111,7 @@ class Messages {
.connect(_address.host, _address.port, timeout: _timeout)
.then(
(socket) {
_log.debug('._socket | connected');
// _log.debug('._socket | connected');
socket.setOption(SocketOption.tcpNoDelay, true);
final message = ArcMessage(Message(socket), keepAlive);
_messages.add(message);
Expand Down

0 comments on commit ede84d1

Please sign in to comment.