Test for proper connection state after a successful accept/connect.
Test for #54.
This commit is contained in:
parent
008163e913
commit
d15e78a517
|
@ -30,6 +30,7 @@ void main()
|
||||||
|
|
||||||
server.waitForConnections!((incoming_, addr) {
|
server.waitForConnections!((incoming_, addr) {
|
||||||
incoming = incoming_; // work around ref counting issue
|
incoming = incoming_; // work around ref counting issue
|
||||||
|
assert(incoming.state == ConnectionState.connected);
|
||||||
print("Got incoming, reading data");
|
print("Got incoming, reading data");
|
||||||
incoming.read!((status, bts) {
|
incoming.read!((status, bts) {
|
||||||
print("Got data");
|
print("Got data");
|
||||||
|
@ -67,6 +68,7 @@ void main()
|
||||||
connectStream!((sock, status) {
|
connectStream!((sock, status) {
|
||||||
client = sock;
|
client = sock;
|
||||||
assert(status == ConnectStatus.connected);
|
assert(status == ConnectStatus.connected);
|
||||||
|
assert(sock.state == ConnectionState.connected);
|
||||||
print("Initial write");
|
print("Initial write");
|
||||||
client.write!((wstatus, bytes) {
|
client.write!((wstatus, bytes) {
|
||||||
print("Initial write done");
|
print("Initial write done");
|
||||||
|
|
Loading…
Reference in a new issue