Skip to content

Fix connection with websocket ssl#310

Merged
tisba merged 1 commit into
processone:developfrom
luisfmcalado:fix-connect-with-wss
Jun 23, 2018
Merged

Fix connection with websocket ssl#310
tisba merged 1 commit into
processone:developfrom
luisfmcalado:fix-connect-with-wss

Conversation

@luisfmcalado

Copy link
Copy Markdown
Contributor

When connecting with server type websocket_ssl the handshake wasn't
been made correctly. This PR solves issue #309.

When connecting with server type `websocket_ssl` the handshake wasn't
been made correctly. This PR solves issue processone#309.
@tisba

tisba commented Jun 23, 2018

Copy link
Copy Markdown
Collaborator

Hi @luisfmcalado! Thanks for your bug report and fix 💕

II've been able to reproduce the issue you've described in #309 and also confirmed your fix. In case someone wants to reproduce, I've been using this configuration:

<?xml version="1.0"?>
<!DOCTYPE tsung SYSTEM "/tsung/share/tsung/tsung-1.0.dtd" []>
<tsung loglevel="debug" dumptraffic="true" version="1.0">
  <clients>
    <client host="localhost" use_controller_vm="true"/>
  </clients>

  <servers>
    <server host="test.mosquitto.org" port="8081" type="websocket_ssl" weight="1" />
  </servers>

  <load>
    <arrivalphase phase="1" duration="10" unit="second">
      <users maxnumber="1" arrivalrate="10" unit="second" />
    </arrivalphase>
  </load>

  <options>
    <option name="websocket_path" value="/"/>
    <option name="websocket_subprotocols" value="mqtt"/>
  </options>

  <sessions>
    <session name="mqtt-subscribe" weight="1" type="ts_mqtt">
      <request>
        <mqtt type="connect" clean_start="true" timeout="30" keepalive="3600"></mqtt>
      </request>

      <request><mqtt type="subscribe" topic="/tsung/#" qos="1"></mqtt></request>

      <for from="1" to="100" incr="1" var="counter">
        <request>
          <mqtt type="waitForMessages" timeout="60"></mqtt>
        </request>
      </for>

      <request><mqtt type="disconnect"></mqtt></request>
    </session>
  </sessions>
</tsung>

I've tested this then using mosquitto_pub to see if we properly receive messages:

mosquitto_pub -h test.mosquitto.org -m "hello tsung" -t '/tsung/test'

@tisba tisba merged commit 68e509f into processone:develop Jun 23, 2018
@nniclausse nniclausse added this to the 1.8.0 milestone Feb 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants