# Error with websocket dispatch config

**URL:** <https://forum.elixirforum.com/t/error-with-websocket-dispatch-config/20654>\
**Category:** Questions\
**Tags:** phoenix, cowboy, websockets, phoenix-14\
**Created:** [March 5, 2019, 10:43pm UTC](https://forum.elixirforum.com/t/error-with-websocket-dispatch-config/20654 "2019-03-05T22:43:02Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![katehedgpeth](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/katehedgpeth/32/14322_2.png) [@katehedgpeth](https://forum.elixirforum.com/u/katehedgpeth)\
**Post date:** [March 6, 2019, 6:34am UTC](https://forum.elixirforum.com/t/error-with-websocket-dispatch-config/20654/4 "2019-03-06T06:34:04Z")

</div>

After combing through the commits in [the socket transport refactor in Phoenix 1.4](https://github.com/phoenixframework/phoenix/pull/2861) much more carefully, I believe I have solved my problem – I thought i would document it here in case anyone else comes across this same issue.

With the new socket transport, sockets do not appear to need their own dispatch transports; Phoenix.Endpoint.Cowboy2Handlers takes care of everything. So I was able to replace the above config with simply:

```elixir
http: [
  dispatch: [
    {:_, [
      {:_, Phoenix.Endpoint.Cowboy2Handler, {SiteWeb.Endpoint, []}}
      ]}
  ]
]

```

---

_[View the full topic](https://forum.elixirforum.com/t/error-with-websocket-dispatch-config/20654)._
