Skip to content

Commit df96243

Browse files
authored
Add 30s timeout to nonblock RPC calls (keybase#23549)
1 parent 5f20ac6 commit df96243

3 files changed

Lines changed: 41 additions & 18 deletions

File tree

‎go/protocol/chat1/local.go‎

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎protocol/avdl/chat1/local.avdl‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,7 @@ protocol local {
748748
DEFAULT_0,
749749
SERVER_1
750750
}
751+
@timeout_msec(30000) // 30 seconds
751752
NonblockFetchRes getThreadNonblock(int sessionID, ConversationID conversationID, GetThreadNonblockCbMode cbMode, GetThreadReason reason, GetThreadNonblockPgMode pgmode, union { null, GetThreadQuery} query, array<string> knownRemotes, union { null, UIPagination } pagination, keybase1.TLFIdentifyBehavior identifyBehavior);
752753

753754

@@ -823,25 +824,36 @@ protocol local {
823824
}
824825

825826
OutboxID generateOutboxID();
827+
@timeout_msec(30000) // 30 seconds
826828
PostLocalNonblockRes postLocalNonblock(int sessionID, ConversationID conversationID, MessagePlaintext msg, MessageID clientPrev, union { null, OutboxID } outboxID, union { null, MessageID } replyTo, keybase1.TLFIdentifyBehavior identifyBehavior);
827829
record PostLocalNonblockRes {
828830
array<RateLimit> rateLimits;
829831
OutboxID outboxID;
830832
array<keybase1.TLFIdentifyFailure> identifyFailures;
831833
}
832834

835+
@timeout_msec(30000) // 30 seconds
833836
PostLocalNonblockRes postTextNonblock(int sessionID, ConversationID conversationID, string tlfName, boolean tlfPublic, string body, MessageID clientPrev, union { null, MessageID } replyTo, union { null, OutboxID } outboxID, keybase1.TLFIdentifyBehavior identifyBehavior, union {null, gregor1.DurationSec} ephemeralLifetime);
837+
838+
@timeout_msec(30000) // 30 seconds
834839
PostLocalNonblockRes postDeleteNonblock(ConversationID conversationID, string tlfName, boolean tlfPublic, MessageID supersedes,MessageID clientPrev, union { null, OutboxID } outboxID, keybase1.TLFIdentifyBehavior identifyBehavior);
835840

836841
record EditTarget {
837842
union { null, MessageID } messageID;
838843
union { null, OutboxID } outboxID;
839844
}
845+
846+
@timeout_msec(30000) // 30 seconds
840847
PostLocalNonblockRes postEditNonblock(ConversationID conversationID, string tlfName, boolean tlfPublic, EditTarget target, string body, union { null, OutboxID } outboxID, MessageID clientPrev, keybase1.TLFIdentifyBehavior identifyBehavior);
841848

849+
@timeout_msec(30000) // 30 seconds
842850
PostLocalNonblockRes postReactionNonblock(ConversationID conversationID, string tlfName, boolean tlfPublic, MessageID supersedes, string body, union { null, OutboxID } outboxID, MessageID clientPrev, keybase1.TLFIdentifyBehavior identifyBehavior);
851+
852+
@timeout_msec(30000) // 30 seconds
843853
PostLocalNonblockRes postHeadlineNonblock(ConversationID conversationID, string tlfName, boolean tlfPublic, string headline, union { null, OutboxID } outboxID, MessageID clientPrev, keybase1.TLFIdentifyBehavior identifyBehavior);
844854
PostLocalRes postHeadline(ConversationID conversationID, string tlfName, boolean tlfPublic, string headline, keybase1.TLFIdentifyBehavior identifyBehavior);
855+
856+
@timeout_msec(30000) // 30 seconds
845857
PostLocalNonblockRes postMetadataNonblock(ConversationID conversationID, string tlfName, boolean tlfPublic, string channelName, union { null, OutboxID } outboxID, MessageID clientPrev, keybase1.TLFIdentifyBehavior identifyBehavior);
846858
PostLocalRes postMetadata(ConversationID conversationID, string tlfName, boolean tlfPublic, string channelName, keybase1.TLFIdentifyBehavior identifyBehavior);
847859

@@ -960,6 +972,8 @@ protocol local {
960972

961973
// Post an attachment from file source to conversationID.
962974
PostLocalRes postFileAttachmentLocal(int sessionID, PostFileAttachmentArg arg);
975+
976+
@timeout_msec(30000) // 30 seconds
963977
PostLocalNonblockRes postFileAttachmentLocalNonblock(int sessionID, PostFileAttachmentArg arg, MessageID clientPrev);
964978

965979
record GetNextAttachmentMessageLocalRes {

‎protocol/json/chat1/local.json‎

Lines changed: 18 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)