Skip to content

Commit

Permalink
Don't use pedantic in peer
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahaog committed Jun 3, 2020
1 parent 9938778 commit c34c8ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
13 changes: 5 additions & 8 deletions lib/src/peer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

import 'dart:async';

import 'package:pedantic/pedantic.dart';
import 'package:stream_channel/stream_channel.dart';

import 'channel_manager.dart';
Expand Down Expand Up @@ -119,10 +118,10 @@ class Peer implements Client, Server {
// Shared methods.

@override
Future listen() async {
unawaited(_client.listen());
unawaited(_server.listen());
await _manager.listen((message) {
Future listen() {
_client.listen();
_server.listen();
return _manager.listen((message) {
if (message is Map) {
if (message.containsKey('result') || message.containsKey('error')) {
_clientIncomingForwarder.add(message);
Expand All @@ -143,9 +142,7 @@ class Peer implements Client, Server {
// server since it knows how to send error responses.
_serverIncomingForwarder.add(message);
}
});

return close();
}).whenComplete(close);
}

@override
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ environment:
sdk: ">=2.2.0 <3.0.0"

dependencies:
pedantic: ^1.8.0
stack_trace: ^1.0.0
stream_channel: ">=1.1.0 <3.0.0"

dev_dependencies:
pedantic: ^1.8.0
test: ^1.0.0
web_socket_channel: ^1.1.0

0 comments on commit c34c8ae

Please sign in to comment.