This repository was archived by the owner on May 24, 2023. It is now read-only.

Description
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
code :
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
}))