WebSocket closed immediately after upgrade

37 views
Skip to first unread message

Dan Ellis

unread,
Sep 24, 2016, 4:21:51 AM9/24/16
to Akka User List
Here's the code I'm using:


When a client connects, I get this in the log:

04:05:17.732 DEBUG akka.io.TcpListener - New connection accepted 
04:05:17.866 DEBUG akka.actor.ActorSystemImpl - Creating WebSocket inbound actor 
04:05:17.869 DEBUG akka.actor.ActorSystemImpl - Creating WebSocket source 
04:05:17.872 DEBUG akka.actor.ActorSystemImpl - Creating WebSocket sink 

and in WireShark I see that the server returned a 101 response, but then immediately after that sent a FIN.

So my source and sink are being created, but my source never get materialized before the socket is closed for some unknown reason. I've been looking at this for a couple of days now, and I just can't see what's causing it to get closed to early. My best guess is that Akka thinks my Source has finished for some reason, but I don't known the Streams API well enough to know why that might be.

Any ideas?

Dan Ellis

unread,
Sep 24, 2016, 4:25:27 AM9/24/16
to Akka User List
Originally on 2.4.7, but I just checked with 2.4.10 and I get the same result.

Akka Team

unread,
Oct 4, 2016, 11:41:10 AM10/4/16
to Akka User List
Did you try running your source, sink and actor without Akka HTTP in a unit test or such and verify that they work as you expect?

--
Johan
Akka Team

On Sat, Sep 24, 2016 at 3:25 AM, Dan Ellis <d...@danellis.me> wrote:
Originally on 2.4.7, but I just checked with 2.4.10 and I get the same result.

--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscribe@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages