Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port does not close client connection when the FIX session is terminated #79

Open
wbjohnston opened this issue Mar 18, 2021 · 0 comments
Labels
C-bug Category: bug E-easy Call for participation: Experience needed to fix: Easy / not much M-port Module: port
Projects

Comments

@wbjohnston
Copy link
Owner

Steps to reproduce

  1. Connect to matchbook on localhost:8080

  2. Send a valid logon message.

    {
        "Header": {
            "BeginString": "FIX.4.2",
            "MsgType": "A",
            "SenderCompID": "wbj",
            "TargetCompID": "matchbook",
            "MsgSeqNum": 1,
            "SendingTime": "2021-03-16 21:58:53.521981634 UTC"
        },
        "Body": {},
        "Trailer": {}
    }
  3. Send a message with an already used sequence number. In this case 1 has already been used

    {
        "Header": {
            "BeginString": "FIX.4.2",
            "MsgType": "D",
            "SenderCompID": "wbj",
            "TargetCompID": "matchbook",
            "MsgSeqNum": 1,
            "SendingTime": "2021-03-16 21:58:53.521981634 UTC"
        },
        "Body": {
            "ClOrdId": "foobar",
            "HandlInst": "3",
            "Price": 12.0,
            "Symbol": "ADBE",
            "Side": "1",
            "TransactTime": "2021-03-16 21:58:53.521981634 UTC",
            "OrdType": "2",
            "OrderQty": 100.0
        },
        "Trailer": {}
    }
  4. Receive a Logout message

  5. The connection will remain open

Log

ncat localhost 8080
{"Header": { "BeginString": "FIX.4.2", "MsgType": "A", "SenderCompID": "wbj", "TargetCompID": "matchbook", "MsgSeqNum": 1, "SendingTime": "2021-03-16 21:58:53.521981634 UTC" }, "Body": {}, "Trailer": {}}
{"Header":{"BeginString":"FIX.4.2","MsgType":"A","SenderCompID":"matchbook","TargetCompID":"wbj","MsgSeqNum":1,"SendingTime":"2021-03-16T21:58:53.521981634Z"},"Body":{},"Trailer":{}}{"Header": { "BeginString": "FIX.4.2", "MsgType": "D", "SenderCompID": "wbj", "TargetCompID": "matchbook", "MsgSeqNum": 2, "SendingTime": "2021-03-16 21:58:53.521981634 UTC" }, "Body": { "ClOrdId": "foobar", "HandlInst": "3", "Price": 12.0, "Symbol": "ADBE", "Side": "1", "TransactTime": "2021-03-16 21:58:53.521981634 UTC", "OrdType": "2", "OrderQty": 100.0}, "Trailer": {}}
{"Header":{"BeginString":"FIX.4.2","MsgType":"8","SenderCompID":"matchbook","TargetCompID":"wbj","MsgSeqNum":1,"SendingTime":"2021-03-18T22:07:16.016448572Z"},"Body":{"OrderID":"foobar","OrdStatus":"0","ExecID":"foobar","ExecTransType":"0","ExecType":"0","LeavesQty":100.0,"CumQty":0.0,"AvgPx":0.0,"Symbol":"ADBE","Side":"1","OrderQty":100.0},"Trailer":{}}{"Header": { "BeginString": "FIX.4.2", "MsgType": "D", "SenderCompID": "wbj", "TargetCompID": "matchbook", "MsgSeqNum": 2, "SendingTime": "2021-03-16 21:58:53.521981634 UTC" }, "Body": { "ClOrdId": "foobar", "HandlInst": "3", "Price": 12.0, "Symbol": "ADBE", "Side": "1", "TransactTime": "2021-03-16 21:58:53.521981634 UTC", "OrdType": "2", "OrderQty": 100.0}, "Trailer": {}}
{"Header":{"BeginString":"FIX.4.2","MsgType":"5","SenderCompID":"matchbook","TargetCompID":"matchbook","MsgSeqNum":1,"SendingTime":"2021-03-18T22:07:18.620860722Z"},"Body":{},"Trailer":{}}
^C

NOTE the above log contains me sending messages, and the responses. The connection didn't terminate until I used ctrl+c.

@wbjohnston wbjohnston added M-port Module: port C-bug Category: bug labels Mar 18, 2021
@wbjohnston wbjohnston added this to To do in main Mar 18, 2021
@wbjohnston wbjohnston added the E-easy Call for participation: Experience needed to fix: Easy / not much label Mar 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug E-easy Call for participation: Experience needed to fix: Easy / not much M-port Module: port
Projects
main
To do
Development

No branches or pull requests

1 participant