shoenig / go-mqtt

A development fork of the Eclipse Paho Go MQTT client
http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.golang.git/
Eclipse Public License 1.0
13 stars 6 forks source link

Receipts needs some locking #21

Closed shoenig closed 10 years ago

shoenig commented 10 years ago

Running at speed with a real MessageSight

panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x1 pc=0x4085ff]

goroutine 6 [running]:
runtime.panic(0x642be0, 0x92d8e8)
    /usr/local/go/src/pkg/runtime/panic.c:266 +0xb6
github.com/shoenig/go-mqtt.alllogic(0xc210041e00)
    /home/sahoenig/Documents/GO/src/github.com/shoenig/go-mqtt/net.go:177 +0x896
created by github.com/shoenig/go-mqtt.(*MqttClient).Start
    /home/sahoenig/Documents/GO/src/github.com/shoenig/go-mqtt/client.go:144 +0x46d

goroutine 1 [runnable]:
syscall.Syscall(0x1, 0x1, 0xc2100ac000, 0x18, 0x18, ...)
    /usr/local/go/src/pkg/syscall/asm_linux_amd64.s:38 +0x64
syscall.write(0x1, 0xc2100ac000, 0x18, 0x28, 0x8, ...)
    /usr/local/go/src/pkg/syscall/zsyscall_linux_amd64.go:1228 +0x72
syscall.Write(0x1, 0xc2100ac000, 0x18, 0x28, 0x76, ...)
    /usr/local/go/src/pkg/syscall/syscall_unix.go:151 +0x5c
os.(*File).write(0xc210000008, 0xc2100ac000, 0x18, 0x28, 0x0, ...)
    /usr/local/go/src/pkg/os/file_unix.go:194 +0x7b
os.(*File).Write(0xc210000008, 0xc2100ac000, 0x18, 0x28, 0x101, ...)
    /usr/local/go/src/pkg/os/file.go:139 +0x98
fmt.Fprintln(0x7f8001f40168, 0xc210000008, 0x7f8001db0dc8, 0x1, 0x1, ...)
    /usr/local/go/src/pkg/fmt/print.go:287 +0xa3
fmt.Println(0x7f8001db0dc8, 0x1, 0x1, 0x5ddd00, 0x0, ...)
    /usr/local/go/src/pkg/fmt/print.go:296 +0x6f
main.main()
    /home/sahoenig/Documents/GO/src/github.com/shoenig/go-mqtt/samples/sample.go:95 +0x12cc