]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
only close connection if EAGAIN and socket state closed..
authorPatience Warnick <patience@cranium.pelton.net>
Tue, 15 Jan 2008 20:05:59 +0000 (12:05 -0800)
committerPatience Warnick <patience@cranium.pelton.net>
Tue, 15 Jan 2008 20:05:59 +0000 (12:05 -0800)
src/kernel/messenger.c

index 9066597d5e18e2a3ccfd670f44a3d8257ea11f54..8a2af20ead6c7819990ea89c564b85b15251ced2 100644 (file)
@@ -38,7 +38,8 @@ static void ceph_send_fault(struct ceph_connection *con, int error)
 
        if (!con->delay) {
                derr(1, "ceph_send_fault timeout not set\n");
-               remove_connection(con->msgr, con);
+               if (error != -EAGAIN || test_bit(CLOSED, &con->state))
+                       remove_connection(con->msgr, con);
                return;
        }
 
@@ -478,10 +479,10 @@ more:
                set_bit(CONNECTING, &con->state);
                dout(5, "try_write initiating connect on %p new state %lu\n", con, con->state);
                ret = ceph_tcp_connect(con);
-               dout(5, "try_write initiated connect ret = %d\n state = %lu", ret, con->state);
+               dout(30, "try_write returned from connect ret = %d state = %lu", ret, con->state);
                if (ret < 0) {
                        /* fault */
-                       derr(1, "connect error\n");
+                       derr(1, "try_write connect error\n");
                        ceph_send_fault(con, ret);
                        goto done;
                }