bemasher / rtlamr

An rtl-sdr receiver for Itron ERT compatible smart meters operating in the 900MHz ISM band.
GNU Affero General Public License v3.0
2.19k stars 249 forks source link

Consistent panic exit #180

Closed utdrmac closed 3 years ago

utdrmac commented 3 years ago

Every time I used rtlamr, it panic-exits with the same message. Whether I ctrl-c, or do a one-shot:

20:44:37.146511 main.go:332: read tcp 127.0.0.1:57196->127.0.0.1:1234: use of closed network connection
io.ReadFull
main.(*Receiver).Run.func1
    /home/drmac/go/src/github.com/bemasher/rtlamr/main.go:174
runtime.goexit
    /usr/local/go/src/runtime/asm_amd64.s:1374

This is visible in rtl_tcp:

ll+, now 501
ll+, now 502
worker socket bye
Signal caught, exiting!
comm recv bye
Signal caught, exiting!
all threads dead..
listening...
Use the device argument 'rtl_tcp=127.0.0.1:1234' in OsmoSDR (gr-osmosdr) source
to receive samples in GRC and control rtl_tcp parameters (frequency, gain, ...).
utdrmac commented 3 years ago

Commenting these lines, https://github.com/bemasher/rtlamr/blob/master/main.go#L331-L333, removes the panic.

bemasher commented 3 years ago

See also 2335efc which fixes some behavior broken by that commit...