mandrewcito / signalrcore

SignalR Core python client
https://mandrewcito.github.io/signalrcore/
MIT License
115 stars 53 forks source link

Script exits too soon #67

Open MikeRavenelle opened 3 years ago

MikeRavenelle commented 3 years ago

I am having issues with my python script that uses signalrcore. The script works perfectly when ran from the command line but when I launch it via a shell script from a dot net core application it exits before the connection is even started.

Log when ran from command line:

Connection started Negotiate url:https://localhost/configHub/negotiate Response status code200 start url:wss://localhost/configHub?id=KnVEgbXhMF832U_5oSbvvg Handler registered started ScriptFinished Connection started Negotiate url:https://localhost/configHub/negotiate Response status code200 start url:wss://localhost/configHub?id=0m9YKSz01IA3qS654rGJCw Handler registered started ScriptFinished --- request header --- GET /configHub?id=0m9YKSz01IA3qS654rGJCw HTTP/1.1^M Upgrade: websocket^M Connection: Upgrade^M Host: localhost^M Origin: http://localhost^M Sec-WebSocket-Key: 5nVtvV/urzt/rj1nfG48bA==^M Sec-WebSocket-Version: 13^M ^M


--- response header --- HTTP/1.1 101 Switching Protocols Connection: Upgrade Date: Fri, 13 Aug 2021 15:13:50 GMT Server: Kestrel Upgrade: websocket Sec-WebSocket-Accept: q/n/9skwZcKHBJs/K4hGbg3fNQc=

-- web socket open -- Sending message <signalrcore.messages.handshake.request.HandshakeRequestMessage object at 0x7f28fde0ab38> {"protocol": "json", "version": 1}^^ send: b'\x81\xa3\xe8\x1d8\xc2\x93?H\xb0\x87iW\xa1\x87q\x1a\xf8\xc8?R\xb1\x87s\x1a\xee\xc8?N\xa7\x9anQ\xad\x86?\x02\xe2\xd9`&' Message received{}^^ Evaluating handshake {}^^ Sending message InvocationMessage: invocation_id fc23fcb8-e8ce-480b-8b57-fc93987f6721, target ScriptFinished, arguments [] {"type": 1, "headers": {}, "target": "ScriptFinished", "arguments": [], "invocationId": "fc23fcb8-e8ce-480b-8b57-fc93987f6721"}^^ send: b'\x81\xfe\x00\x80\xa1\xc8\xda\x17\xda\xea\xaen\xd1\xad\xf8-\x81\xf9\xf67\x83\xa0\xbfv\xc5\xad\xa8d\x83\xf2\xfal\xdc\xe4\xfa5\xd5\xa9\xa8p\xc4\xbc\xf8-\x81\xea\x89t\xd3\xa1\xaac\xe7\xa1\xb4~\xd2\xa0\xbfs\x83\xe4\xfa5\xc0\xba\xbdb\xcc\xad\xb4c\xd2\xea\xe07\xfa\x95\xf67\x83\xa1\xb4a\xce\xab\xbbc\xc8\xa7\xb4^\xc5\xea\xe07\x83\xae\xb9%\x92\xae\xb9u\x99\xe5\xbf/\xc2\xad\xf7#\x99\xf8\xb8:\x99\xaa\xef \x8c\xae\xb9.\x92\xf1\xe2 \xc7\xfe\xed%\x90\xea\xa7\t' Message received{"type":1,"target":"ScriptFinished","arguments":[]}^^{"type":3,"invocationId":"fc23fcb8-e8ce-480b-8b57-fc93987f6721","result":null}^^ Raw message incomming: {"type":1,"target":"ScriptFinished","arguments":[]}^^{"type":3,"invocationId":"fc23fcb8-e8ce-480b-8b57-fc93987f6721","result":null}^^ Connection stop

Log when launched via shell script from dot net core application:

Connection started Negotiate url:https://localhost/configHub/negotiate Response status code200 start url:wss://localhost/configHub?id=KnVEgbXhMF832U_5oSbvvg Handler registered started ScriptFinished