@@ -65,7 +65,7 @@ public void SendMessage(SignalServiceSyncMessage message)
65
65
}
66
66
}
67
67
68
- public void HandleOutgoingMessages ( )
68
+ public async Task HandleOutgoingMessages ( )
69
69
{
70
70
Logger . LogDebug ( "HandleOutgoingMessages()" ) ;
71
71
while ( ! Token . IsCancellationRequested )
@@ -92,7 +92,7 @@ public void HandleOutgoingMessages()
92
92
else
93
93
{
94
94
List < SignalServiceAddress > recipients = new List < SignalServiceAddress > ( ) ;
95
- SignalGroup g = SignalDBContext . GetOrCreateGroupLocked ( outgoingSignalMessage . ThreadId , 0 ) ;
95
+ SignalGroup g = await SignalDBContext . GetOrCreateGroupLocked ( outgoingSignalMessage . ThreadId , 0 ) ;
96
96
foreach ( GroupMembership sc in g . GroupMemberships )
97
97
{
98
98
if ( sc . Contact . ThreadId != SignalLibHandle . Instance . Store . Username )
@@ -132,7 +132,7 @@ public void HandleOutgoingMessages()
132
132
}
133
133
foreach ( UntrustedIdentityException e in identityExceptions )
134
134
{
135
- Handle . HandleOutgoingKeyChangeLocked ( e . E164number , Base64 . EncodeBytes ( e . IdentityKey . serialize ( ) ) ) ;
135
+ await Handle . HandleOutgoingKeyChangeLocked ( e . E164number , Base64 . EncodeBytes ( e . IdentityKey . serialize ( ) ) ) ;
136
136
}
137
137
}
138
138
catch ( RateLimitException )
@@ -144,15 +144,15 @@ public void HandleOutgoingMessages()
144
144
{
145
145
Logger . LogError ( "HandleOutgoingMessages() could not send due to untrusted identities" ) ;
146
146
outgoingSignalMessage . Status = SignalMessageStatus . Failed_Identity ;
147
- Handle . HandleOutgoingKeyChangeLocked ( e . E164number , Base64 . EncodeBytes ( e . IdentityKey . serialize ( ) ) ) ;
147
+ await Handle . HandleOutgoingKeyChangeLocked ( e . E164number , Base64 . EncodeBytes ( e . IdentityKey . serialize ( ) ) ) ;
148
148
}
149
149
catch ( Exception e )
150
150
{
151
151
var line = new StackTrace ( e , true ) . GetFrames ( ) [ 0 ] . GetFileLineNumber ( ) ;
152
152
Logger . LogError ( "HandleOutgoingMessages() failed in line {0}: {1}\n {2}" , line , e . Message , e . StackTrace ) ;
153
153
outgoingSignalMessage . Status = SignalMessageStatus . Failed_Unknown ;
154
154
}
155
- Handle . HandleMessageSentLocked ( outgoingSignalMessage ) ;
155
+ await Handle . HandleMessageSentLocked ( outgoingSignalMessage ) ;
156
156
}
157
157
Logger . LogInformation ( "HandleOutgoingMessages() finished" ) ;
158
158
}
0 commit comments