Open loveyandex opened 1 year ago
Closed because of too little information. The headline should be a short description and not all the information provided.
Closed because of too little information. The headline should be a short description and not all the information provided.
u right i will reform it
app.Get("/ws/:id", websocket.New(func(c *websocket.Conn) {
//this chan for connection alive
var forever chan string
Q, err := ch.Consume(
qqq.Name, // queue
"", // consumer
false, // auto-ack
false, // exclusive
false, // no-local
false, // no-wait
nil, // args
)
for d := range Q{
b := d.Body
// log.Printf("msg recv: %s", b)
if err = c.WriteMessage(1, b); err != nil {
log.Println("orderbooks write:", err)
}
}
<-forever
}))
write tcp4 127.0.0.1:4000->127.0.0.1:24754: wsasend: An established connection was aborted by the software in your host machine.
problem
when i open browser first time all is ok ... but by refrreshing it can not be established to connnection and was aborted no data can be exchanged the code for websocker stablishing is talking with rabbitmq task queue