connection lost when waiting for connack response using mqtt websockets for ibm bluemix watson iot

242 views Asked by At

I'm able to perform ssl & websocket handshake. The http connection is getting upgraded to websocket connection which is fine. The erlang websocket client is getting connected to the IBM Bluemix server.

But after some time I receive ssl_closed response which closes down the connection. I was sending ping request to the server and was getting response for it in binary format (which might be pong ({binary,<<10,0>>} .. haven't decoded the binary response frame).

SockReply : {ok,{sslsocket,{gen_tcp,#Port<0.2284>,tls_connection,undefined}, <0.52.0>}} 
Socket : {sslsocket,{gen_tcp,#Port<0.2284>,tls_connection,undefined}, <0.52.0>} [debug] [d:6xxxxx:myFybr123:[email protected]:57054] 
SENT: CONNECT(Q0, R0, D0, ClientId=d:6xxxxx:myXXXX123:streetlight_123, ProtoName=MQTT, ProtoVsn=3, CleanSess=true, KeepAlive=300, Username=use-token-auth, Password=**)

[info] [Client <0.36.0>] connected with wss://6xxxxx.messaging.internetofthings.ibmcloud.com:443

[warning] [Client <0.36.0>] Connection lost for: ssl_closed when state is waiting_for_connack

Message : {ssl_closed, {sslsocket, {gen_tcp,#Port<0.3922>,tls_connection,undefined}, <0.74.0>}}

Why am I receiving ssl_closed after getting connected?

0

There are 0 answers