Skip to content

Duplicate SessionID #614

@fattymango

Description

@fattymango

I'm creating a FIX(4.4) client and I'm trying to implement a retry mechanism that stops the entire initiator and starts it all over again, I'm doing this since the Quickfix auto reconnect doesn't send a ResetOnLogon in the reconnect message.

but when I try to create a new initiator with the same session I get a Duplicate SessionID error, I was able to reproduce the error and it appears to be from this function

func registerSession(s *session) error {
	sessionsLock.Lock()
	defer sessionsLock.Unlock()

	if _, ok := sessions[s.sessionID]; ok { // here
		return errDuplicateSessionID
	}

	sessions[s.sessionID] = s
	return nil
}

it works as expected when I remove the session check.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions