fix: eliminate possibility of unhandled socket exceptions
Resolves #1689
- How I did it
take up at_server_spec 5.0.0 which changes return type of AtConnection.write from void to Future
change signature of write in all subclasses / implementers of AtConnection
BaseSocketConnection.write now calls await socket.flush() after calling socket.write(...)
ensure all code which calls .write uses await connection.write(...)
InboundConnectionImpl and OutboundConnectionImpl now call socket.done.onError(...) to ensure that all async errors are handled appropriately
- How to verify it
Automated tests pass
gkc's manual testing process, whereas previously async socket exceptions were going to the runZonedGuarded error handler, now the exceptions are being handled correctly in the appropriate place
- What I did
- How I did it
write
in all subclasses / implementers of AtConnectionawait socket.flush()
after callingsocket.write(...)
await connection.write(...)
- How to verify it