Skip to content

Instantly share code, notes, and snippets.

Last active Apr 17, 2020
What would you like to do?
package main
import (
func main() {
srv := pstest.NewServer()
conn, _ := grpc.Dial(srv.Addr, grpc.WithInsecure())
defer srv.Close()
defer conn.Close()
c, _ := pubsub.NewClient(context.Background(), "project", option.WithGRPCConn(conn))
ctx := context.Background()
topic, _ := c.CreateTopic(ctx, "topic")
sub, _ := c.CreateSubscription(ctx, "sub", pubsub.SubscriptionConfig{Topic: topic})
panic: close of closed channel
goroutine 52 [running]:*subscription).stop(...)*GServer).DeleteSubscription(0xc0000be138, 0x16ef8e0, 0xc0004011a0, 0xc0004011d0, 0x0, 0x0, 0x0) +0xfd, 0xc0000be138, 0x16ef8e0, 0xc0004011a0, 0xc000486a80, 0x0, 0x16ef8e0, 0xc0004011a0, 0xc0004c4330, 0x24) +0x217*Server).processUnaryRPC(0xc0000d0f20, 0x16f48c0, 0xc0003a2480, 0xc0004c8600, 0xc000122d20, 0x1afec40, 0x0, 0x0, 0x0) +0x460*Server).handleStream(0xc0000d0f20, 0x16f48c0, 0xc0003a2480, 0xc0004c8600, 0x0) +0xd3d*Server).serveStreams.func1.1(0xc00039c060, 0xc0000d0f20, 0x16f48c0, 0xc0003a2480, 0xc0004c8600) +0xa1
created by*Server).serveStreams.func1 +0xa1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment