This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"sync" | |
"sync/atomic" | |
) | |
// Fill Channel with int values | |
func fillChan(number int) <-chan int { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
conn.on("close", function() { | |
winston.error("-> mq.connection: close event received"); | |
mq.channel = null; | |
// Try to reconnect every X seconds | |
let timer = setInterval(function () { | |
winston.info('-> mq.connection: trying to reconnect...'); | |
mq.connect((err) => { | |
if (err) { |