mirror of https://github.com/grpc/grpc-dart.git
Don't print from server (#212)
Co-authored-by: Vyacheslav Egorov <vegorov@google.com>
This commit is contained in:
parent
7ea15a8160
commit
21529c6be7
|
@ -105,8 +105,10 @@ class ConnectionServer {
|
|||
// timeout.
|
||||
connection.incomingStreams.listen((stream) {
|
||||
handler = serveStream_(stream);
|
||||
}, onError: (error) {
|
||||
print('Connection error: $error');
|
||||
}, onError: (error, stackTrace) {
|
||||
if (error is Error) {
|
||||
Zone.current.handleUncaughtError(error, stackTrace);
|
||||
}
|
||||
}, onDone: () {
|
||||
// TODO(sigurdm): This is not correct behavior in the presence of
|
||||
// half-closed tcp streams.
|
||||
|
@ -175,11 +177,11 @@ class Server extends ConnectionServer {
|
|||
final connection = ServerTransportConnection.viaSocket(socket,
|
||||
settings: http2ServerSettings);
|
||||
serveConnection(connection);
|
||||
}, onError: _printSocketError);
|
||||
}
|
||||
|
||||
void _printSocketError(Object error) {
|
||||
print('Socket error: $error');
|
||||
}, onError: (error, stackTrace) {
|
||||
if (error is Error) {
|
||||
Zone.current.handleUncaughtError(error, stackTrace);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@visibleForTesting
|
||||
|
|
Loading…
Reference in New Issue