Azure / azure-relay-node

☁️Node.js library for Azure Relay Hybrid Connections
https://docs.microsoft.com/en-us/azure/service-bus-relay/relay-what-is-it
MIT License
12 stars 15 forks source link

DTRACE_HTTP_SERVER_RESPONSE undefined crash in HybridConnectionHttpsServer.js #26

Closed philmay closed 4 years ago

philmay commented 5 years ago

Actual Behavior

My hybrid connection listener code crashes due to the global function DTRACE_HTTP_SERVER_RESPONSE referenced in hyco-https/lib/HybridConnectionHttpsServer.js not being defined. This appears similar to issue #18, where the offending function was COUNTER_HTTP_SERVER_RESPONSE, which I see has been commented out in the current version.

I have created a temp fix in my code by defining global.DTRACE_HTTP_SERVER_RESPONSE do be a dummy function. With this fix in place, it seems to be working.

Here's the error:

/usr/src/app/node_modules/hyco-https/lib/HybridConnectionHttpsServer.js:119
  DTRACE_HTTP_SERVER_RESPONSE(this.connection);
  ^

ReferenceError: DTRACE_HTTP_SERVER_RESPONSE is not defined
    at ServerResponse._finish (/usr/src/app/node_modules/hyco-https/lib/HybridConnectionHttpsServer.js:119:3)
    at ServerResponse.end (/usr/src/app/node_modules/hyco-https/lib/_hyco_outgoing.js:669:10)
    at Server.requestHandler (/usr/src/app/listener-https.js:37:7)
    at Server.emit (events.js:189:13)
    at WebSocket.<anonymous> (/usr/src/app/node_modules/hyco-https/lib/HybridConnectionHttpsServer.js:609:17)
    at WebSocket.emit (events.js:189:13)
    at WebSocket.setSocket (/usr/src/app/node_modules/ws/lib/websocket.js:159:10)
    at ClientRequest.req.on (/usr/src/app/node_modules/ws/lib/websocket.js:617:10)
    at ClientRequest.emit (events.js:189:13)
    at TLSSocket.socketOnData (_http_client.js:475:11)

Versions

onionhammer commented 5 years ago

Im getting th esame issue.

bainian12345 commented 4 years ago

Should be fixed in the newest version, 1.4.4