Skip to content
This repository has been archived by the owner on Mar 11, 2020. It is now read-only.

Closing a connection causes panic on a server #10

Closed
klizhentas opened this issue Aug 17, 2013 · 3 comments
Closed

Closing a connection causes panic on a server #10

klizhentas opened this issue Aug 17, 2013 · 3 comments
Labels

Comments

@klizhentas
Copy link
Contributor

panic: runtime error: close of closed channel

goroutine 13 [running]:
github.com/dotcloud/go-redis-server.func·010()
    /home/mg/goworld/src/github.com/dotcloud/go-redis-server/server.go:96 +0xf7
created by github.com/dotcloud/go-redis-server.Serve
    /home/mg/goworld/src/github.com/dotcloud/go-redis-server/server.go:97 +0x34e

goroutine 1 [IO wait]:
net.runtime_pollWait(0x7f028abf1f00, 0x72, 0x0)
    /usr/local/go/src/pkg/runtime/znetpoll_linux_amd64.c:118 +0x82
net.(*pollDesc).WaitRead(0xc20008b080, 0xb, 0xc2000823f0)
    /usr/local/go/src/pkg/net/fd_poll_runtime.go:75 +0x31
net.(*netFD).accept(0xc20008b000, 0x58c9f8, 0x0, 0xc2000823f0, 0xb, ...)
    /usr/local/go/src/pkg/net/fd_unix.go:385 +0x2c1
net.(*TCPListener).AcceptTCP(0xc200000250, 0x42b4c1, 0x7f028ab6ce08, 0x42b4c1)
    /usr/local/go/src/pkg/net/tcpsock_posix.go:229 +0x45
net.(*TCPListener).Accept(0xc200000250, 0xc200000278, 0xc200000058, 0xc200085520, 0x0, ...)
    /usr/local/go/src/pkg/net/tcpsock_posix.go:239 +0x25
github.com/dotcloud/go-redis-server.(*Server).Serve(0xc200082300, 0xc20006f540, 0xc200000250, 0x0, 0x0, ...)
    /home/mg/goworld/src/github.com/dotcloud/go-redis-server/server.go:47 +0x115
github.com/dotcloud/go-redis-server.(*Server).ListenAndServe(0xc200082300, 0xc200082300, 0xc200000058)
    /home/mg/goworld/src/github.com/dotcloud/go-redis-server/server.go:34 +0x169
main.main()
    /home/mg/goworld/src/github.com/mailgun/pulsar/pulsar/main.go:18 +0x247
@ghost ghost assigned creack Aug 17, 2013
@creack
Copy link
Contributor

creack commented Aug 17, 2013

I don't manage to reproduce using redis-cli. How could I reproduce?

@creack
Copy link
Contributor

creack commented Aug 18, 2013

Ok, I found out why. It was due to the keepalive. I'll submit a patch.

@creack
Copy link
Contributor

creack commented Aug 20, 2013

fixed on master

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants