Skip to content

Commit b2cc44e

Browse files
committed
change logs to use correct transport name
1 parent 5c9f506 commit b2cc44e

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/src/shared/iostream.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ class IOStreamTransport implements Transport {
5959
Future<void> start() async {
6060
if (_started) {
6161
throw StateError(
62-
"InMemoryTransport already started! Note that server/client .connect() calls start() automatically.",
62+
"IOStreamTransport already started! Note that server/client .connect() calls start() automatically.",
6363
);
6464
}
6565
_started = true;
@@ -78,7 +78,7 @@ class IOStreamTransport implements Transport {
7878
} catch (error, stackTrace) {
7979
_started = false; // Reset state
8080
final startError = StateError(
81-
"Failed to start InMemoryTransport: $error\n$stackTrace",
81+
"Failed to start IOStreamTransport: $error\n$stackTrace",
8282
);
8383
try {
8484
onerror?.call(startError);
@@ -98,7 +98,7 @@ class IOStreamTransport implements Transport {
9898

9999
/// Internal handler for when the input stream closes
100100
void _onStreamDone() {
101-
print("InMemoryTransport: Input stream closed.");
101+
print("IOStreamTransport: Input stream closed.");
102102
close(); // Close transport when input ends
103103
}
104104

@@ -137,7 +137,7 @@ class IOStreamTransport implements Transport {
137137
print("Error in onerror handler: $e");
138138
}
139139
print(
140-
"InMemoryTransport: Error processing read buffer: $parseError. Skipping data.",
140+
"IOStreamTransport: Error processing read buffer: $parseError. Skipping data.",
141141
);
142142
break; // Stop processing buffer on error
143143
}
@@ -149,7 +149,7 @@ class IOStreamTransport implements Transport {
149149
Future<void> close() async {
150150
if (_closed || !_started) return; // Already closed or never started
151151

152-
print("InMemoryTransport: Closing transport...");
152+
print("IOStreamTransport: Closing transport...");
153153

154154
// Mark as closing immediately to prevent further sends/starts
155155
_started = false;
@@ -167,7 +167,7 @@ class IOStreamTransport implements Transport {
167167
} catch (e) {
168168
print("Error in onclose handler: $e");
169169
}
170-
print("InMemoryTransport: Transport closed.");
170+
print("IOStreamTransport: Transport closed.");
171171
}
172172

173173
/// Sends a message to the output stream.
@@ -177,7 +177,7 @@ class IOStreamTransport implements Transport {
177177
Future<void> send(JsonRpcMessage message) async {
178178
if (!_started || _closed) {
179179
throw StateError(
180-
"Cannot send message: InMemoryTransport is not running or is closed.",
180+
"Cannot send message: IOStreamTransport is not running or is closed.",
181181
);
182182
}
183183

@@ -186,7 +186,7 @@ class IOStreamTransport implements Transport {
186186
sink.add(utf8.encode(jsonString));
187187
// No need to flush as StreamSink should handle this
188188
} catch (error, stackTrace) {
189-
print("InMemoryTransport: Error writing to output stream: $error");
189+
print("IOStreamTransport: Error writing to output stream: $error");
190190
final Error sendError = (error is Error)
191191
? error
192192
: StateError("Output stream write error: $error\n$stackTrace");

0 commit comments

Comments
 (0)