TCP failover with open connection

Hi community.

I am running a simple test for TCP failover using nc:

nc -klv 6001
nc -klv 6002

to listen on both ports specified in the backend and then I run

[opc@virutal-prod haproxy]$ nc localhost 6000
msg1
msg2

to send message which all go to 6001 which is fine. But when I kill the nc on 6002 I get:


[opc@virutal-prod haproxy]$ nc localhost 6000
msg1
msg2
msg3
msg4
Ncat: Broken pipe.

I get a broken pipe. When rerun nc localhost 6000, it connects correctly to 6002.

My question is if it is expected to get a broken pipe or should the existing TCP connection have been relocated from to server on 6001 to the server running on 6002?

HAProxy config is:

defaults
    mode                    tcp
    log                     global
    option                  tcplog
    option                  dontlognull
    option http-server-close
    option forwardfor       except 127.0.0.0/8
    option                  redispatch
    retries                 3
    timeout http-request    10s
    timeout queue           1m
    timeout connect         10s
    timeout client          1m
    timeout server          1m
    timeout http-keep-alive 10s
    timeout check           10s
    maxconn                 3000


frontend main
    mode tcp
    bind *:6000
    default_backend             app

backend app
    balance     roundrobin
    mode tcp
    server  app1 127.0.0.1:6001 check on-marked-down shutdown-sessions on-marked-up shutdown-backup-sessions
    server  app2 127.0.0.1:6002 check backup