Read instead of write to get connection reset by peer. See #3128

This commit is contained in:
Björn Antonsson 2013-03-20 11:21:09 +01:00
parent 83541e8abf
commit e18281803e

View file

@ -44,7 +44,7 @@ class TcpConnectionSpec extends AkkaSpec("akka.io.tcp.register-timeout = 500ms")
val clientSocketOnServer = acceptServerSideConnection(serverSocket)
clientSocketOnServer.socket.setSoLinger(true, 0)
clientSocketOnServer.close()
clientSocket.write(ByteBuffer.allocate(1))
clientSocket.read(ByteBuffer.allocate(1))
null
} catch {
case NonFatal(e) e.getMessage