Global channel timeout (js)

25 views
Skip to first unread message

maxfa...@gmail.com

unread,
Jul 1, 2017, 3:51:54 AM7/1/17
to phoenix-talk
I have some quantity of channel pushes, without timeout receive condition. How I can set global timeout callback for every push on channel?
For example, I have case for timeout in one channel push and it's works:
channel.push('my:method', {}, 10000)
 
.receive( 'ok', (msg) => {
   
// do something
 
})
 
.receive( 'error', (err) => {
   
// do something
 
})
 
.receive( 'timeout', () => {
   
// TIMEOUT CALLBACK ...
 
})
}

OvermindDL1

unread,
Jul 3, 2017, 12:14:20 PM7/3/17
to phoenix-talk, maxfa...@gmail.com
What exactly are you trying to do?  Are you wanting to add a 'default' timeout receive to 'all' `push`'s?
Reply all
Reply to author
Forward
0 new messages