You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 5, 2020. It is now read-only.
To reproduce this issue, try the SSCCE that follows and double click on the Toggle button a couple of times. You should see multiple open/pending connections in Chrome's Network tab. If you allow some delay between clicks, connections get closed properly.
I have tried this on macOS version 10.12.5 using Chrome version 58.0.3029.110 and Chrome Canary version 61.0.3132.0.
importHtmlexposing (..)
importHtml.Attributesexposing (..)
importHtml.Eventsexposing (..)
importWebSocketmain =Html.program
{ init = init
, view = view
, update = update
, subscriptions = subscriptions
}echoServer:StringechoServer ="wss://echo.websocket.org"type alias Model=Boolinit: (Model, CmdMsg)
init =(True,Cmd.none)type Msg=NewMessageString|Toggleupdate:Msg->Model-> (Model, CmdMsg)
update msg model =case msg ofToggle->(not model,Cmd.none)
_ ->(model,Cmd.none)subscriptions:Model->SubMsgsubscriptions model =if model
then WebSocket.listen echoServer NewMessageelse Sub.none
view:Model->HtmlMsgview model =
div [][ button [onClick Toggle][text "Toggle"]]
The text was updated successfully, but these errors were encountered:
To reproduce this issue, try the SSCCE that follows and double click on the Toggle button a couple of times. You should see multiple open/pending connections in Chrome's Network tab. If you allow some delay between clicks, connections get closed properly.
I have tried this on macOS version 10.12.5 using Chrome version 58.0.3029.110 and Chrome Canary version 61.0.3132.0.
The text was updated successfully, but these errors were encountered: