Several connections

66 views
Skip to first unread message

Evgeni Kolesnevg

unread,
Oct 31, 2015, 8:02:03 AM10/31/15
to nginxpushstream
Hi,
I'm trying use several channels, and when i remove some channels and add new, i see that old connection is closing and creating new, is it normal? or may be i should do something to use the same connection?

Second - as i see old connection status http://joxi.ru/BA0ddj9Iy0dzAy Switching P, it does not get any msgs from server, is it normal?

Thank you

Wandenberg Peixoto

unread,
Oct 31, 2015, 11:49:05 AM10/31/15
to nginxpu...@googlegroups.com
Hi Evgeni,

It is normal. There isn't support to add or remove channels without disconnect and connect again with the new channels.

I'm not sure if I understood your second question, but after you add/remove channels the current connection is finished and does not receive any data.
The 101 Switching Protocol status does not mean that the connection is active, it only indicates that the basic http connection was transformed in a websockect connetion, "switch the protocol" and this happens on the beginning of the connection, and the status does not change after that.
You can check that is not receiving more data comparing with the current connection. In you print both requests have 101 status, but the first one finished after 2.46 s and the second one still pending ("active") .

One suggestion to avoid reconnections is to call the connect method only after all calls to addChannel were done.

Regards,
Wandenberg

--
You received this message because you are subscribed to the Google Groups "nginxpushstream" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nginxpushstre...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Evgeni Kolesnevg

unread,
Oct 31, 2015, 12:30:28 PM10/31/15
to nginxpushstream
Thank you for quick answer Wanden
Reply all
Reply to author
Forward
0 new messages