Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix connection with websocket ssl #310

Merged
merged 1 commit into from
Jun 23, 2018

Conversation

luisfmcalado
Copy link
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
Copy link
Collaborator

tisba commented Jun 23, 2018

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.

None yet

3 participants