|
|
@ -190,6 +190,19 @@ func (ms *MasterServer) KeepConnected(stream master_pb.Seaweed_KeepConnectedServ |
|
|
|
|
|
|
|
peerAddress := findClientAddress(stream.Context(), req.GrpcPort) |
|
|
|
|
|
|
|
// only one shell can be connected at any time
|
|
|
|
if req.Name == "shell" { |
|
|
|
if ms.currentAdminShellClient == ""{ |
|
|
|
ms.currentAdminShellClient = peerAddress |
|
|
|
defer func() { |
|
|
|
ms.currentAdminShellClient = "" |
|
|
|
}() |
|
|
|
} else { |
|
|
|
return fmt.Errorf("only one concurrent shell allowed, but another shell is already connected from %s", peerAddress) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
stopChan := make(chan bool) |
|
|
|
|
|
|
|
clientName, messageChan := ms.addClient(req.Name, peerAddress) |
|
|
|