elixir-circuits / circuits_uart

Discover and use UARTs and serial ports in Elixir
Apache License 2.0
188 stars 48 forks source link

Can't close connection to unopened device #75

Closed ConnorRigby closed 4 years ago

ConnorRigby commented 4 years ago

https://github.com/elixir-circuits/circuits_uart/blob/4832c8748edc488d6840a780c366c35d509f345d/lib/circuits_uart.ex#L511

This line will cause an exception if UART.open/3 was not called, or if it was called, but returned an error

fhunleth commented 4 years ago

It looks like the line could be deleted anyway. Want to send a PR?