Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"IO error - EOF" error after calling producer.Stop() #212

Closed
tmpapageorgiou opened this issue Jun 30, 2017 · 2 comments
Closed

"IO error - EOF" error after calling producer.Stop() #212

tmpapageorgiou opened this issue Jun 30, 2017 · 2 comments

Comments

@tmpapageorgiou
Copy link

tmpapageorgiou commented Jun 30, 2017

The error message are generate intermitantly lways after call producer.Stop()

(localhost:4150) IO error - EOF

The following code reproduces the problem:

package main                                                                                                                        
                                                                                                                                    
import (                                                                                                                            
    "bitbucket.org/tpapageorgiou/mytest/broker"                                                                   
    log "github.com/Sirupsen/logrus"                                                                                                
    "github.com/nsqio/go-nsq"                                                                                                       
)                                                                                                                                   
                                                                                                                                    
func main() {                                                                                                                       
    config := nsq.NewConfig()                                                                                                       
                                                                                                                                    
    buffer := []byte{`{"test": "123"}`}                                                                                                            
                                                                                                                                    
    for i := 0; i < 100; i++ {                                                                                                      
        producer, _ := nsq.NewProducer("localhost:4150", config)                                                                    
        producer.SetLogger(broker.NewNSQLogrusLoggerAtLevel(log.DebugLevel))                                                        
        err := producer.Publish("test_topic", buffer)                                                                               
                                                                                                                                    
        if err != nil {                                                                                                             
            log.Error(err)                                                                                                          
        }                                                                                                                           
        producer.Stop()                                                                                                             
    }                                                                                                                               
}   

I am using:

@tmpapageorgiou
Copy link
Author

Thi is a diplicated of #184

@ploxiln
Copy link
Member

ploxiln commented Jul 1, 2017

This is indeed a duplicate, but it was thought to have been fixed in #201 which was included in go-nsq v1.0.6

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

No branches or pull requests

2 participants